bind9/lib/dns
Mark Andrews c40133d840 Silence Insecure data handling (TAINTED_SCALAR)
Coverity assumes that the memory holding any value read using byte
swapping is tainted.  As we store the NSEC3PARAM records in wire
form and iterations is byte swapped the memory holding the record
is marked as tainted.  nsec3->salt_length is marked as tainted
transitively. To remove the taint the value need to be range checked.
For a correctly formatted record region.length should match
nsec3->salt_length and provides a convenient value to check the field
against.

    *** CID 316507:  Insecure data handling  (TAINTED_SCALAR)
    /lib/dns/rdata/generic/nsec3param_51.c: 241 in tostruct_nsec3param()
    235     	region.length = rdata->length;
    236     	nsec3param->hash = uint8_consume_fromregion(&region);
    237     	nsec3param->flags = uint8_consume_fromregion(&region);
    238     	nsec3param->iterations = uint16_consume_fromregion(&region);
    239
    240     	nsec3param->salt_length = uint8_consume_fromregion(&region);
    >>>     CID 316507:  Insecure data handling  (TAINTED_SCALAR)
    >>>     Passing tainted expression "nsec3param->salt_length" to "mem_maybedup", which uses it as an offset.
    241     	nsec3param->salt = mem_maybedup(mctx, region.base,
    242     					nsec3param->salt_length);
    243     	if (nsec3param->salt == NULL) {
    244     		return (ISC_R_NOMEMORY);
    245     	}
    246     	isc_region_consume(&region, nsec3param->salt_length);
2021-02-12 10:19:27 +11:00
..
include implement xfrin via XoT 2021-01-29 12:07:38 +01:00
rdata Silence Insecure data handling (TAINTED_SCALAR) 2021-02-12 10:19:27 +11:00
tests Print warning when falling back to increment soa serial method 2020-12-11 10:48:28 +01:00
win32 implement xfrin via XoT 2021-01-29 12:07:38 +01:00
.gitignore 4394. [func] Add rndc command "dnstap-reopen" to close and 2016-06-24 09:37:04 +10:00
acl.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
adb.c Simplify the EDNS buffer size logic for DNS Flag Day 2020 2020-10-05 16:21:21 +02:00
badcache.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
byaddr.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
cache.c Remove the option 'cleaning-interval' 2021-01-19 10:12:40 +01:00
callbacks.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
catz.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
client.c The dns_message_create() cannot fail, change the return to void 2020-09-29 08:22:08 +02:00
clientinfo.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
compress.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
db.c Cleanup redundant isc_rwlock_init() result checks 2021-02-03 12:22:33 +11:00
dbiterator.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
diff.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
dispatch.c Silence cppcheck 2.2 false positive in udp_recv() 2020-11-25 12:45:47 +01:00
dlz.c Cleanup redundant isc_rwlock_init() result checks 2021-02-03 12:22:33 +11:00
dns64.c add dns_dns64_findprefix 2020-11-25 08:25:29 +11:00
dnsrps.c Add stale-refresh-time option 2020-11-11 12:53:23 -03:00
dnssec.c Publish CDS/CDNSKEY Delete Records 2020-12-23 09:02:11 +01:00
dnstap.c The dns_message_create() cannot fail, change the return to void 2020-09-29 08:22:08 +02:00
dnstap.proto fix spelling errors reported by Fossies. 2020-02-21 15:05:08 +11:00
ds.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
dst_api.c Add function to see if dst key uses kasp 2020-12-23 09:02:11 +01:00
dst_internal.h Add function to see if dst key uses kasp 2020-12-23 09:02:11 +01:00
dst_openssl.h update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
dst_parse.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
dst_parse.h update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
dst_pkcs11.h update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
dst_result.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
dyndb.c Use libuv's shared library handling capabilities 2020-10-28 15:48:58 +01:00
ecs.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
fixedname.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
forward.c Cleanup redundant isc_rwlock_init() result checks 2021-02-03 12:22:33 +11:00
gen-unix.h update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
gen-win32.h update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
gen.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
geoip2.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
gssapi_link.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
gssapictx.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
hmac_link.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
ipkeylist.c implement xfrin via XoT 2021-01-29 12:07:38 +01:00
iptable.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
journal.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
kasp.c Fix signatures-validity config option 2021-01-12 10:54:48 +00:00
key.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
keydata.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
keymgr.c Use NUM_KEYSTATES constant where appropriate 2021-02-03 15:35:06 +01:00
keytable.c Cleanup redundant isc_rwlock_init() result checks 2021-02-03 12:22:33 +11:00
lib.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
log.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
lookup.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
Makefile.am implement xfrin via XoT 2021-01-29 12:07:38 +01:00
master.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
masterdump.c rndc dumpdb -expired: print when RRsets expired 2020-09-23 16:09:26 +02:00
message.c Check that sig0 name is the root. 2020-09-30 13:24:29 +00:00
name.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
ncache.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
nsec.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
nsec3.c Detect NSEC3 salt collisions 2020-11-26 10:43:59 +01:00
nta.c Cleanup redundant isc_rwlock_init() result checks 2021-02-03 12:22:33 +11:00
openssl_link.c Refactor TLSDNS module to work with libuv/ssl directly 2021-01-25 09:19:22 +01:00
openssldh_link.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
opensslecdsa_link.c Make opensslecdsa_parse use fromlabel 2021-01-26 15:01:26 +01:00
openssleddsa_link.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
opensslrsa_link.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
order.c Allow "order none" in "rrset-order" rules 2020-10-02 08:41:43 +02:00
peer.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
pkcs11.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
pkcs11ecdsa_link.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
pkcs11eddsa_link.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
pkcs11rsa_link.c Fix misplaced declaration 2020-12-01 10:46:58 +11:00
private.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
rbt.c Reformat sources using clang-format-11 2020-12-08 18:36:23 +01:00
rbtdb.c Remove redundant 'version == NULL' check 2021-02-03 13:06:27 +01:00
rbtdb.h update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
rcode.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
rdata.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
rdatalist.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
rdatalist_p.h update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
rdataset.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
rdatasetiter.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
rdataslab.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
request.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
resolver.c Cleanup redundant isc_rwlock_init() result checks 2021-02-03 12:22:33 +11:00
result.c Add NSEC3PARAM unit test, refactor zone.c 2020-11-26 10:43:59 +01:00
rootns.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
rpz.c Cleanup redundant isc_rwlock_init() result checks 2021-02-03 12:22:33 +11:00
rriterator.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
rrl.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
sdb.c Add stale-refresh-time option 2020-11-11 12:53:23 -03:00
sdlz.c Add stale-refresh-time option 2020-11-11 12:53:23 -03:00
soa.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
ssu.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
ssu_external.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
stats.c Update comments to have binary notation 2020-09-29 10:36:07 +10:00
tcpmsg.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
time.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
timer.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
tkey.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
transport.c implement xfrin via XoT 2021-01-29 12:07:38 +01:00
tsec.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
tsig.c Cleanup redundant isc_rwlock_init() result checks 2021-02-03 12:22:33 +11:00
tsig_p.h update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
ttl.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
update.c Treat dnssec-policy "none" as a builtin zone 2020-12-23 09:02:11 +01:00
validator.c Handle DNS_R_NCACHENXRRSET in fetch_callback_{dnskey,validator}() 2020-10-30 00:17:24 +11:00
view.c implement xfrin via XoT 2021-01-29 12:07:38 +01:00
xfrin.c implement xfrin via XoT 2021-01-29 12:07:38 +01:00
zone.c Cleanup redundant isc_rwlock_init() result checks 2021-02-03 12:22:33 +11:00
zone_p.h Add NSEC3PARAM unit test, refactor zone.c 2020-11-26 10:43:59 +01:00
zonekey.c update all copyright headers to eliminate the typo 2020-09-14 16:20:40 -07:00
zoneverify.c Optimise dnssec-verify 2021-01-28 11:07:03 +11:00
zt.c Cleanup redundant isc_rwlock_init() result checks 2021-02-03 12:22:33 +11:00