bind9/lib/dns
Ondřej Surý 2bbbd60de3
Reject oversized RRsets at slab construction
dns_rdataslab_fromrdataset(), dns_rdataslab_merge() and
dns_rdataslab_subtract() summed per-record storage into an
unsigned int with no upper-bound check.  An RRset whose total
encoded size exceeds DNS_RDATA_MAXLENGTH cannot fit in a DNS
message and is unservable; building its in-memory representation
only burns memory on data that will fail at response time, and at
the upper bound the running sum could in theory wrap.

Cap the running total at DNS_RDATA_MAXLENGTH and return ISC_R_NOSPACE
when exceeded.  Update the qpdb cache memory-purge test to use a
record size that fits within the new limit.

Assisted-by: Claude:claude-opus-4-7
(cherry picked from commit f9d24b1b85)
2026-05-05 19:24:29 +02:00
..
include Remove DNS_KEYFLAG_EXTENDED 2026-05-05 11:07:32 +02:00
rdata Allow the dns_rdata_in_apl structure to be walked twice 2026-03-27 12:38:01 +00:00
.gitignore Add support for User Statically Defined Tracing (USDT) probes 2023-08-21 18:39:53 +02:00
acl.c Use ControlStatementsExceptControlMacros for SpaceBeforeParens 2025-08-19 08:08:23 +02:00
adb.c Fix non-atomic read-modify-write on entry->srtt in adjustsrtt() 2026-03-20 01:06:56 +00:00
badcache.c Improve the badcache cleaning by adding LRU and using RCU 2024-11-27 17:07:03 +00:00
byaddr.c Use clang-format-20 to update formatting 2025-06-25 13:32:08 +10:00
cache.c Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00
callbacks.c add setup/commit functions to rdatacallbacks 2024-03-08 15:36:56 -08:00
catz.c Remove unnecessary dns_name_free call 2026-04-15 12:30:22 +10:00
client.c Fix memory context leak in dns_client_resolve() error path 2026-03-16 10:50:22 +01:00
clientinfo.c refactor dns_clientinfo_init(); use separate function to set ECS 2023-02-07 23:48:22 -08:00
compress.c Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00
db.c Fix assertion failure in dns_db_findrdataset() for SIG records 2026-04-17 19:24:13 +02:00
db_p.h Rewrite the GLUE cache in QP zone database 2025-01-06 14:00:47 +01:00
dbiterator.c Implement dns_dbiterator_seek3 2025-12-11 13:53:25 +01:00
diff.c Fix dropped covers field for SIG records in dns_diff_apply 2026-04-17 19:24:13 +02:00
dispatch.c Fix copy-paste typos in dns_dispatchmgr comments 2026-03-15 03:13:00 +01:00
dlz.c Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00
dns64.c Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00
dnsrps.c Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00
dnssec.c standardize CHECK and RETERR macros 2025-12-03 19:17:20 -08:00
dnstap.c Take 'env' reference before async calling perform_reopen() 2026-03-18 17:04:56 +00:00
dnstap.proto Update the dnstap protobuf definition 2024-04-26 16:08:46 +03:00
ds.c Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00
dst_api.c Remove DNS_KEYFLAG_EXTENDED 2026-05-05 11:07:32 +02:00
dst_internal.h Minor refactor of dst code 2025-10-01 12:26:40 +00:00
dst_openssl.h Report file and line when converting OpenSSL errors 2023-04-03 12:06:04 +10:00
dst_parse.c Use isc__zero_or_more when calling isc_base64_tobuffer 2026-01-28 08:02:06 +11:00
dst_parse.h Remove TKEY Mode 2 (Diffie-Hellman) 2023-03-08 08:36:25 +01:00
dyndb.c standardize CHECK and RETERR macros 2025-12-03 19:17:20 -08:00
ecs.c Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00
ede.c Don't copy EDE codes if source is same as destination 2025-04-02 16:42:23 +00:00
fixedname.c Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00
forward.c Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00
gen.c Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00
geoip2.c Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00
gssapi_link.c Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00
gssapictx.c Release gnamebuf also on the error path 2026-02-06 18:36:58 +01:00
hmac_link.c Size HMAC key generation buffers to the maximum block size 2026-04-30 06:00:07 +02:00
ipkeylist.c Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00
iptable.c Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00
journal.c standardize CHECK and RETERR macros 2025-12-03 19:17:20 -08:00
kasp.c Implement named-checkconf -k (check keys) 2025-09-29 15:13:26 +02:00
key.c Don't check DNS_KEYFLAG_NOAUTH 2025-03-24 23:52:02 -07:00
keydata.c Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00
keymgr.c Make keymgr state machine more robust 2025-12-05 13:22:00 +01:00
keystore.c Fix log level bug in keystore 2026-02-25 16:27:29 +00:00
keytable.c Fix rwlock type mismatch in delete_ds() error path 2026-03-17 23:25:21 +01:00
log.c remove {root-}delegation-only 2023-03-23 12:57:01 -07:00
Makefile.am Add support for parsing DSYNC scheme mnemonics 2025-08-06 13:13:34 +10:00
master.c Dispatch async work jobs from the correct loop 2026-03-14 07:52:59 +01:00
masterdump.c Dispatch async work jobs from the correct loop 2026-03-14 07:52:59 +01:00
message.c Retry lookups with unsigned DNAME over TCP 2025-10-02 12:58:54 +02:00
name.c Optimize memory layout of core structs 2024-12-09 09:04:28 +01:00
nametree.c Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00
ncache.c Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00
nsec.c Drop single-use RETERR macro 2024-12-10 08:47:25 +00:00
nsec3.c Don't create NSEC3 nodes for unsigned delegations 2025-12-11 13:53:25 +01:00
nta.c Replace existing NTA instead of reusing it in dns_ntatable_add() 2026-03-23 08:31:32 +00:00
openssl_link.c standardize CHECK and RETERR macros 2025-12-03 19:17:20 -08:00
openssl_shim.c Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00
openssl_shim.h Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00
opensslecdsa_link.c standardize CHECK and RETERR macros 2025-12-03 19:17:20 -08:00
openssleddsa_link.c standardize CHECK and RETERR macros 2025-12-03 19:17:20 -08:00
opensslrsa_link.c Reject RSA DNSKEYs with oversize public exponents at parse time 2026-04-30 13:16:30 +02:00
order.c Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00
peer.c Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00
private.c standardize CHECK and RETERR macros 2025-12-03 19:17:20 -08:00
probes.d Do not destroy IXFR journal in xfrin_end() 2023-12-20 17:21:14 +01:00
qp.c Fix dns_qpmulti_memusage() on empty dns_qpmulti_t instance 2025-09-17 14:01:44 +02:00
qp_p.h Tune min and max chunk size 2025-08-05 12:48:19 +02:00
qpcache.c Fix memory leak in QPcache addnoqname/addclosest mechanism 2026-03-13 13:22:23 +01:00
qpcache_p.h rename qpdb to qpcache 2024-03-08 15:36:56 -08:00
qpzone.c Do not update the case on unchanged rdatasets 2026-02-24 13:04:19 +01:00
qpzone_p.h stub dns_qpmulti-based zone database implementation 2024-03-06 20:57:31 -08:00
rbt-cachedb.c standardize CHECK and RETERR macros 2025-12-03 19:17:20 -08:00
rbt-zonedb.c Fix formatting 2026-02-02 10:32:38 +01:00
rbt.c standardize CHECK and RETERR macros 2025-12-03 19:17:20 -08:00
rbtdb.c Fix memory leak in QPcache addnoqname/addclosest mechanism 2026-03-13 13:22:23 +01:00
rbtdb_p.h Expand the usage of mark_ancient() helper functions 2025-02-03 15:53:34 +01:00
rcode.c standardize CHECK and RETERR macros 2025-12-03 19:17:20 -08:00
rdata.c standardize CHECK and RETERR macros 2025-12-03 19:17:20 -08:00
rdatalist.c Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00
rdataset.c Move setresign to rdataset.c and rename it 2026-01-29 09:13:02 +01:00
rdatasetiter.c Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00
rdataslab.c Reject oversized RRsets at slab construction 2026-05-05 19:24:29 +02:00
remote.c Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00
request.c Fix assertion failure when sending notify fails over UDP 2026-02-20 10:50:19 +01:00
resconf.c standardize CHECK and RETERR macros 2025-12-03 19:17:20 -08:00
resolver.c Fix data race on fctx->vresult in validated() 2026-03-20 03:22:53 +01:00
result.c Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00
rootns.c Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00
rpz.c Fix a bug in rpz.c:del_name() 2026-03-14 12:43:37 +00:00
rriterator.c Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00
rrl.c Use a keyed hash for the RRL bucket table 2026-05-04 16:15:58 +02:00
sdlz.c Implement dns_dbiterator_seek3 2025-12-11 13:53:25 +01:00
skr.c Importing invalid SKR file might overflow the stack buffer 2026-02-24 18:45:41 +00:00
soa.c Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00
ssu.c Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00
ssu_external.c Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00
stats.c Use clang-format-20 to update formatting 2025-06-25 13:32:08 +10:00
tests Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
time.c Use clang-format-22 to update formatting 2026-03-04 12:18:27 +01:00
tkey.c Fix a bug in dns_tkey_processquery() 2026-03-13 13:39:38 +01:00
transport.c Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00
tsig.c Prevent assertion when processing TSIG algorithm 2025-05-07 13:45:48 +02:00
tsig_p.h remove dns__tsig_algallocated() 2023-06-14 08:14:38 +00:00
ttl.c standardize CHECK and RETERR macros 2025-12-03 19:17:20 -08:00
update.c standardize CHECK and RETERR macros 2025-12-03 19:17:20 -08:00
validator.c Tidy up cleanup path in check_signer() 2026-05-05 07:43:15 +02:00
view.c Convert dns_dtenv_t reference counting to standard macors 2026-03-18 17:04:56 +00:00
xfrin.c Fix a race condition in xfrin_recv_done() when calling xfrin_reset() 2026-04-03 12:05:44 +00:00
zone.c Simplify checkds_create() to return void 2026-03-16 11:04:58 +01:00
zone_p.h Refactor findzonekeys 2024-01-25 14:48:07 +01:00
zonekey.c Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00
zoneverify.c Use the correct maximal compressed bit map buffer size 2026-04-10 06:23:53 +00:00
zt.c Remove redundant parentheses from the return statement 2024-11-19 14:26:52 +01:00