]> git.ipfire.org Git - thirdparty/bind9.git/commit
Consistently set specials[0] to 1
authorMark Andrews <marka@isc.org>
Wed, 11 Mar 2026 22:23:00 +0000 (09:23 +1100)
committerEvan Hunt <each@isc.org>
Thu, 9 Apr 2026 01:25:12 +0000 (18:25 -0700)
commit4ad393c8ddf02ba7757f50f3104bec878cfd4ef7
tree50163762208a10d9ad48a5a22f64f7c7f8c1adf3
parent249fb48758bd752e2039ff381d7b28e7ded965c9
Consistently set specials[0] to 1

NULs in text files indicate corruption.  Additionally embedded NULs
can cause text files to be interpreted differently to the way they
appear to be when read by humans.  We addressed this for zone files
in 4bf686cf, by setting specials[0] to 1, where a corrupted zone
file was interpreted differently to the way it read.  We should
have applied this to other places where we read text files at that
time.  We are now applying this to

bin/dnssec/dnssec-ksr.c.
bin/tools/named-rrchecker.c
lib/dns/dst_api.c
lib/dns/skr.c
lib/isccfg/parser.c

We should also apply this consistently to all code that mimics
reading text files to prevent false negatives like that reported
in #5796.  e.g. fuzz/dns_rdata_fromtext.c
bin/dnssec/dnssec-ksr.c
bin/tools/named-rrchecker.c
fuzz/dns_rdata_fromtext.c
lib/dns/dst_api.c
lib/dns/skr.c
lib/isccfg/parser.c