bind9/tests
Ondřej Surý a23437e45e
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 rbtdb 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:25:12 +02:00
..
dns Reject oversized RRsets at slab construction 2026-05-05 19:25:12 +02:00
include/tests ISC_RUN_TEST_IMPL should use a static declaration 2026-01-29 00:43:25 +11:00
irs Check that nameservers are parsed correctly 2024-12-13 10:27:22 +11:00
isc Use clang-format-22 to update formatting 2026-03-04 12:24:53 +01:00
isccfg Remove redundant parentheses from the return statement 2024-11-19 16:06:16 +01:00
libtest Drop superfluous isc_mem_get() NULL check 2024-12-13 14:54:48 +01:00
ns wrap ns_client_error() for unit testing 2025-02-25 16:23:14 -08:00
.gitignore Move all the unit tests to /tests/<libname>/ 2022-05-31 12:06:00 +02:00
Makefile.am Stop the unit tests from running twice 2022-05-31 12:06:00 +02:00
unit-test-driver.sh.in Reformat shell scripts with shfmt 2023-10-26 13:05:00 +02:00