mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-12-04 22:08:27 +00:00
Fix OOB read in find SOA - attacker-controlled minTTL
Thanks to 전승훈 <snowjeon2@cau.ac.kr> for finding this bug, it's a repeat of the problems seen in CVE-2026-4891. Their explanation: find_soa() reads two DNS names from an SOA record's RDATA using extract_name() — the MNAME and RNAME fields. Both calls pass qlen (the whole-packet bound) rather than a bound derived from the current record's rdlen. If either name contains a compression pointer or is long enough, p can be advanced beyond the actual end of the SOA RDATA. The subsequent length check CHECK_LEN(header, p, qlen, 20) succeeds whenever the advanced pointer still happens to fall within the overall packet, even if it is now past the RDATA boundary. The code then executes: GETLONG(minttl, p); /* reads 4 bytes from the wrong location */ *ttlp = minttl; The result is that *ttlp is set to 4 bytes read from an arbitrary location inside the packet rather than the SOA's actual minimum TTL field. A crafted upstream reply with a DNS-compressed MNAME or RNAME in the SOA RDATA can therefore cause dnsmasq to cache any attacker-chosen TTL for negative responses. Impact An attacker who controls or can spoof an upstream DNS response can force dnsmasq to use an arbitrarily large minimum TTL (up to 2³²−1 seconds ≈ 136 years) for NXDOMAIN caching, effectively poisoning the negative cache and causing legitimate domains to appear non-existent to downstream clients indefinitely. With a TTL of 0 the same attack can disable negative caching entirely.
This commit is contained in:
2 files changed
+7
-2
No files matched your search
@@ -20,9 +20,13 @@ version 2.94
|
|||||||
Georgi Steffenhagen (ServerTec IT Engineering) for this one.
|
Georgi Steffenhagen (ServerTec IT Engineering) for this one.
|
||||||
|
|
||||||
Fix possible DNSSEC bypass in prove_non_existence_nsec()
|
Fix possible DNSSEC bypass in prove_non_existence_nsec()
|
||||||
Thanks to 전승훈 <snowjeon2@cau.ac.kr> for finding this bug, it's
|
Thanks to 전승훈 Seunghoon Jeon for finding this bug, it's
|
||||||
a repeat of the problems seen in CVE-2026-4891.
|
a repeat of the problems seen in CVE-2026-4891.
|
||||||
|
|
||||||
|
Fix OOB read in find SOA - attacker-controlled minTTL
|
||||||
|
Thanks to 전승훈 Seunghoon Jeon for finding this bug, it's
|
||||||
|
another repeat of the problems seen in CVE-2026-4891.
|
||||||
|
|
||||||
|
|
||||||
version 2.93
|
version 2.93
|
||||||
Fix a corner-case in DNSSEC validation with wildcards. If we have
|
Fix a corner-case in DNSSEC validation with wildcards. If we have
|
||||||
|
|||||||
+2
-1
@@ -574,7 +574,8 @@ static int find_soa(struct dns_header *header, size_t qlen, char *name, int *sub
|
|||||||
|
|
||||||
for (j = 0; j < 2; j++) /* MNAME, RNAME */
|
for (j = 0; j < 2; j++) /* MNAME, RNAME */
|
||||||
{
|
{
|
||||||
if (!extract_name(header, qlen, &p, daemon->workspacename, EXTR_NAME_EXTRACT, 0))
|
if (!extract_name(header, qlen, &p, daemon->workspacename, EXTR_NAME_EXTRACT, 0) ||
|
||||||
|
(p - psave > rdlen))
|
||||||
{
|
{
|
||||||
if (cache)
|
if (cache)
|
||||||
blockdata_free(addr.rrblock.rrdata);
|
blockdata_free(addr.rrblock.rrdata);
|
||||||
|
|||||||
Reference in new issue
Block a user