]> git.ipfire.org Git - thirdparty/bind9.git/commit
Enforce NSEC3 record consistency
authorMark Andrews <marka@isc.org>
Wed, 18 Feb 2026 01:30:22 +0000 (12:30 +1100)
committerOndřej Surý <ondrej@sury.org>
Tue, 24 Feb 2026 13:57:22 +0000 (14:57 +0100)
commit3801d0ebbf8da69077af84dae7f7ec23718b839b
treef3e76045338765878ce09b579a57ad0fb6592724
parent67b4fb56e40bf856e1fccd41e752d5f486b5b569
Enforce NSEC3 record consistency

NSEC3 hashes are required to fit within a single DNS label.  Since there
are 5 bits per label byte without pad characters, the maximum hash size
is floor(63*5/8) (39 bytes).

This patch enforces this maximum length for unknown algorithms, while
strictly enforcing the exact expected digest length for known algorithms
like SHA-1.
bin/tests/system/checkzone/zones/crashzone.db
lib/dns/include/dns/nsec3.h
lib/dns/rdata/generic/nsec3_50.c
lib/isc/include/isc/iterated_hash.h
tests/bench/iterated_hash.c