From 53d3aa68b203f6e1000e58adb2ef26a136c5e324 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Tue, 4 Aug 2026 18:33:39 +0200 Subject: [PATCH] Backport also unit test for CVE-2026-11721 Unit tests should run fine, no new features needed. CVE: CVE-2026-11721 Resolves: RHEL-213406 --- bind-9.16-CVE-2026-11721-test.patch | 148 ++++++++++++++++++++++++++++ bind9.16.spec | 4 + 2 files changed, 152 insertions(+) create mode 100644 bind-9.16-CVE-2026-11721-test.patch diff --git a/bind-9.16-CVE-2026-11721-test.patch b/bind-9.16-CVE-2026-11721-test.patch new file mode 100644 index 0000000..f7d3b58 --- /dev/null +++ b/bind-9.16-CVE-2026-11721-test.patch @@ -0,0 +1,148 @@ +From 53123b5a9f9ce0d84f352452ff24907f5930d8df Mon Sep 17 00:00:00 2001 +From: Mark Andrews +Date: Tue, 14 Apr 2026 13:46:22 +1000 +Subject: [PATCH] Test RRSIG record parsing + +In particular test that labels and signer fields are consistent. + +(cherry picked from commit 5a95e64731afe63d348d272cc4d3b2f9847150c2) +(cherry picked from commit ebf391bdb8ea196dab43d0a1e1f639458cb15126) +--- + lib/dns/tests/rdata_test.c | 114 +++++++++++++++++++++++++++++++++++++ + 1 file changed, 114 insertions(+) + +diff --git a/lib/dns/tests/rdata_test.c b/lib/dns/tests/rdata_test.c +index 0f9ddef82d..edf83c94cc 100644 +--- a/lib/dns/tests/rdata_test.c ++++ b/lib/dns/tests/rdata_test.c +@@ -2367,6 +2367,119 @@ rkey(void **state) { + dns_rdatatype_rkey, sizeof(dns_rdata_rkey_t)); + } + ++static void ++rrsig(void **state) { ++ text_ok_t text_ok[] = { ++ TEXT_VALID("SOA 8 0 86400 20260426170000 20260413160000 54393 " ++ ". " ++ "tFbcoVP8MnpecUquJ/aj+XeNgV7ts9GSHVkXaXRJrJ/" ++ "TEkOZApVG0F6E " ++ "9sYpxGk2ItweLL43ujioGj0HWwZDRR+vbur+O/" ++ "dIdheiig1VvU+9HXLi " ++ "QOViY9Kc64ixdyJhYCC5K+bO1qsHxd+" ++ "KJXOaxyHbqchYkDFy4PL6qftE " ++ "VaLkueRgjXgOsq/" ++ "NxvCXDgAa5xy0+3Sl0myxIs8rJ5KeXfJQFe7qxgaw " ++ "VjJsJTKw8neOTw2rQfLaigWu2LIWw+" ++ "IyVrLjZJdLqGkiLBGd1w4X3U12 " ++ "fFxoY3eqzNgBEtduoGKPZ/" ++ "NpP9cuKJORJ18283aV8hR4WO91VR0q1zcM jLwqUg=="), ++ /* labels too short for signer */ ++ TEXT_INVALID("SOA 8 0 86400 20260426170000 20260413160000 " ++ "54393 example. " ++ "tFbcoVP8MnpecUquJ/aj+XeNgV7ts9GSHVkXaXRJrJ/" ++ "TEkOZApVG0F6E " ++ "9sYpxGk2ItweLL43ujioGj0HWwZDRR+vbur+O/" ++ "dIdheiig1VvU+9HXLi " ++ "QOViY9Kc64ixdyJhYCC5K+bO1qsHxd+" ++ "KJXOaxyHbqchYkDFy4PL6qftE " ++ "VaLkueRgjXgOsq/" ++ "NxvCXDgAa5xy0+3Sl0myxIs8rJ5KeXfJQFe7qxgaw " ++ "VjJsJTKw8neOTw2rQfLaigWu2LIWw+" ++ "IyVrLjZJdLqGkiLBGd1w4X3U12 " ++ "fFxoY3eqzNgBEtduoGKPZ/" ++ "NpP9cuKJORJ18283aV8hR4WO91VR0q1zcM jLwqUg=="), ++ /* ++ * Sentinel. ++ */ ++ TEXT_SENTINEL() ++ }; ++ wire_ok_t wire_ok[] = { ++ WIRE_VALID(0x00, 0x06, 0x08, 0x00, 0x00, 0x01, 0x51, 0x80, 0x69, ++ 0xee, 0x44, 0x90, 0x69, 0xdd, 0x13, 0x00, 0xd4, 0x79, ++ 0x00, 0xb4, 0x56, 0xdc, 0xa1, 0x53, 0xfc, 0x32, 0x7a, ++ 0x5e, 0x71, 0x4a, 0xae, 0x27, 0xf6, 0xa3, 0xf9, 0x77, ++ 0x8d, 0x81, 0x5e, 0xed, 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x64, 0x97, ++ 0x4b, 0xa8, 0x69, 0x22, 0x2c, 0x11, 0x9d, 0xd7, 0x0e, ++ 0x17, 0xdd, 0x4d, 0x76, 0x7c, 0x5c, 0x68, 0x63, 0x77, ++ 0xaa, 0xcc, 0xd8, 0x01, 0x12, 0xd7, 0x6e, 0xa0, 0x62, ++ 0x8f, 0x67, 0xf3, 0x69, 0x3f, 0xd7, 0x2e, 0x28, 0x93, ++ 0x91, 0x27, 0x5f, 0x36, 0xf3, 0x76, 0x95, 0xf2, 0x14, ++ 0x78, 0x58, 0xef, 0x75, 0x55, 0x1d, 0x2a, 0xd7, 0x37, ++ 0x0c, 0x8c, 0xbc, 0x2a, 0x52), ++ /* labels too short for signer */ ++ WIRE_INVALID( ++ 0x00, 0x06, 0x08, 0x00, 0x00, 0x01, 0x51, 0x80, 0x69, ++ 0xee, 0x44, 0x90, 0x69, 0xdd, 0x13, 0x00, 0xd4, 0x79, ++ 0x07, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x00, ++ 0xb4, 0x56, 0xdc, 0xa1, 0x53, 0xfc, 0x32, 0x7a, 0x5e, ++ 0x71, 0x4a, 0xae, 0x27, 0xf6, 0xa3, 0xf9, 0x77, 0x8d, ++ 0x81, 0x5e, 0xed, 0xb3, 0xd1, 0x92, 0x1d, 0x59, 0x17, ++ 0x69, 0x74, 0x49, 0xac, 0x9f, 0xd3, 0x12, 0x43, 0x99, ++ 0x02, 0x95, 0x46, 0xd0, 0x5e, 0x84, 0xf6, 0xc6, 0x29, ++ 0xc4, 0x69, 0x36, 0x22, 0xdc, 0x1e, 0x2c, 0xbe, 0x37, ++ 0xba, 0x38, 0xa8, 0x1a, 0x3d, 0x07, 0x5b, 0x06, 0x43, ++ 0x45, 0x1f, 0xaf, 0x6e, 0xea, 0xfe, 0x3b, 0xf7, 0x48, ++ 0x76, 0x17, 0xa2, 0x8a, 0x0d, 0x55, 0xbd, 0x4f, 0xbd, ++ 0x1d, 0x72, 0xe2,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ENTINEL() ++ }; ++ ++ UNUSED(state); ++ ++ check_rdata(text_ok, wire_ok, NULL, false, dns_rdataclass_in, ++ dns_rdatatype_rrsig, sizeof(dns_rdata_rrsig_t)); ++} ++ + /* SSHFP RDATA manipulations */ + static void + sshfp(void **state) { +@@ -3156,6 +3269,7 @@ main(int argc, char **argv) { + cmocka_unit_test_setup_teardown(nsec3, _setup, _teardown), + cmocka_unit_test_setup_teardown(nxt, _setup, _teardown), + cmocka_unit_test_setup_teardown(rkey, _setup, _teardown), ++ cmocka_unit_test_setup_teardown(rrsig, _setup, _teardown), + cmocka_unit_test_setup_teardown(sshfp, _setup, _teardown), + cmocka_unit_test_setup_teardown(wks, _setup, _teardown), + cmocka_unit_test_setup_teardown(zonemd, _setup, _teardown), +-- +2.55.0 + diff --git a/bind9.16.spec b/bind9.16.spec index b5d8f7f..2455d4e 100644 --- a/bind9.16.spec +++ b/bind9.16.spec @@ -200,6 +200,8 @@ Patch236: bind-9.16-CVE-2026-11622.patch Patch237: bind-9.16-CVE-2026-13321.patch # https://github.com/isc-projects/bind9/commit/238ec379e9bed56383ba2333e711e554b139ac13 Patch238: bind-9.16-CVE-2026-10723.patch +# https://gitlab.isc.org/isc-projects/bind9/commit/ebf391bdb8ea196dab43d0a1e1f639458cb15126 +Patch239: bind-9.16-CVE-2026-11721-test.patch %{?systemd_ordering} Requires: coreutils @@ -548,6 +550,7 @@ in HTML and PDF format. %patch236 -p1 -b .CVE-2026-11622 %patch237 -p1 -b .CVE-2026-13321 %patch238 -p1 -b .CVE-2026-10723 +%patch239 -p1 -b .CVE-2026-11721-test %if %{with PKCS11} %patch135 -p1 -b .config-pkcs11 @@ -1304,6 +1307,7 @@ fi; * Thu Jul 23 2026 RHEL Packaging Agent - 32:9.16.23-0.22.9 - Fix CVE-2026-11721: RRSIG labels validation and out-of-zone signing +- Add new unit test - Resolves: RHEL-213406 * Thu Jul 23 2026 RHEL Packaging Agent - 32:9.16.23-0.22.8