]> git.ipfire.org Git - thirdparty/bind9.git/commit
Add a quota for SIG(0) signature checks
authorAram Sargsyan <aram@isc.org>
Mon, 25 Mar 2024 11:07:47 +0000 (11:07 +0000)
committerNicki Křížek <nicki@isc.org>
Mon, 10 Jun 2024 15:33:08 +0000 (17:33 +0200)
commitc7f79a0353d7562fcf3e83ac6983f4ea06050d47
treebf7672a67f12d04c0aea168a2df342b096a06e99
parent24e8cc7b382b0099e5c65166455f9f3358b93035
Add a quota for SIG(0) signature checks

In order to protect from a malicious DNS client that sends many
queries with a SIG(0)-signed message, add a quota of simultaneously
running SIG(0) checks.

This protection can only help when named is using more than one worker
threads. For example, if named is running with the '-n 4' option, and
'sig0checks-quota 2;' is used, then named will make sure to not use
more than 2 workers for the SIG(0) signature checks in parallel, thus
leaving the other workers to serve the remaining clients which do not
use SIG(0)-signed messages.

That limitation is going to change when SIG(0) signature checks are
offloaded to "slow" threads in a future commit.

The 'sig0checks-quota-exempt' ACL option can be used to exempt certain
clients from the quota requirements using their IP or network addresses.

The 'sig0checks-quota-maxwait-ms' option is used to define a maximum
amount of time for named to wait for a quota to appear. If during that
time no new quota becomes available, named will answer to the client
with DNS_R_REFUSED.
13 files changed:
bin/delv/delv.c
bin/named/config.c
bin/named/server.c
bin/tests/system/checkconf/bad-sig0checks-quota-exempt.conf [new file with mode: 0644]
bin/tests/system/checkconf/good-sig0checks-quota-exempt.conf [new file with mode: 0644]
doc/misc/options
lib/isccfg/check.c
lib/isccfg/namedconf.c
lib/ns/client.c
lib/ns/include/ns/client.h
lib/ns/include/ns/server.h
lib/ns/server.c
tests/libtest/ns.c