DL6ER 3a3e7a049f Fix the NSEC3 closest encloser check for deeper wildcard answers
`validate_rrset()` returns the start of the closest encloser as an offset
into the owner name, and `prove_non_existence_nsec3()` is meant to stop
its search there. It compares `name - closest_encloser` with that offset,
but `closest_encloser` only moves forward from `name`, so the difference
is never positive and the search never stops at the encloser the RRSIG
labels field gives.

A wildcard answer one label below the closest encloser is not affected,
as the NSEC3 covering the next closer name covers the query name itself.
Two or more labels below, dnsmasq looks for an NSEC3 matching the closest
encloser, which RFC 5155 section 7.2.6 does not require the zone to send,
and returns SERVFAIL with EDE 12 (NSEC Missing). An example is
foo.login.us2.yubico.com, answered from *.us2.yubico.com.

The comparison came with f603a4f ("Fix a corner-case in DNSSEC validation
with wildcards."), which replaced the name compare. Swap the operands.

Signed-off-by: DL6ER <dl6er@dl6er.de>
2026-10-20 00:05:21 +01:00
2012-04-02 20:40:34 +01:00
2025-12-07 13:44:40 +00:00
2012-01-05 17:31:15 +00:00
2026-10-01 15:34:53 +01:00
2018-01-14 17:32:52 +00:00
2022-05-13 21:22:11 +01:00
2012-01-05 17:31:13 +00:00
2025-07-20 15:29:43 +01:00
2021-06-15 23:14:59 +01:00
2026-04-08 12:08:18 +01:00
2025-07-20 15:29:43 +01:00
2024-12-18 23:58:58 +00:00
2012-01-05 22:00:08 +00:00
S
Description
No description provided
GPL-2.0
6.2 MiB
0 Stars 1 Watchers 0 Forks
Languages
C 94.3%
Perl 2.2%
HTML 1.2%
Shell 1%
Makefile 0.6%
Other 0.6%