CVE-2026-5172: Buffer Overflow

Published Apr 14, 2026
·
Updated

A buffer overflow in dnsmasq’s extractaddresses() function allows an attacker to trigger a heap out-of-bounds read and crash by exploiting a malformed DNS response, enabling extractname() to advance the pointer past the record’s end.

Other sources

In extractaddresses() at rfc1035.c:943, the rdlen field of an RR is trusted without verification. When extractname() is called on the record's data, it can advance p1 past the calculated end of the record (endrr). The subsequent calculation of remaining bytes (endrr - p1) underflows to a huge unsigned value, causing a massive heap OOB read and certain crash. Fix: add p1 > endrr check after the extractname() call.

Red Hat

Affected Software

4 affected componentsFixes available
Dnsmasq Dnsmasq
debian/dnsmasq<=2.85-1, <=2.85-1+deb11u1, <=2.92-4
2.90-4~deb12u22.91-1+deb13u12.92-5
Microsoft azl3 dnsmasq 2.90-1
Microsoft azl3 dnsmasq 2.92-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/dnsmasq to a version that resolves this vulnerability.

    Fixed in 2.90-4~deb12u2Fixed in 2.91-1+deb13u1Fixed in 2.92-5
  2. Configuration

    In extract_addresses() at rfc1035.c:943, after the extract_name() call, add a check that p1 > endrr is handled (i.e., verify the pointer does not advance past the end of the RR) to prevent heap out-of-bounds reads/crash from malformed DNS responses. CVE-2026-5172.

    dnsmasq (rfc1035.c extract_addresses) p1 > endrr check after extract_name() call = Add conditional check: if (p1 > endrr) then treat record as invalid/abort parsing

Event History

Apr 14, 2026
Data Sourced
via Red Hat·10:59 PM
DescriptionSeverityAffected Software
May 11, 2026
CVE Published
via MITRE·04:48 PM
Data Sourced
via MITRE·04:48 PM
DescriptionWeakness
Data Sourced
via NVD·06:16 PM
DescriptionSeverity
Data Sourced
via NVD·06:16 PM
Weakness
May 13, 2026
Data Sourced
via Launchpad·03:08 PM
Description
May 15, 2026
Data Sourced
via Microsoft·08:01 AM
DescriptionSeverityWeaknessAffected Software
Updated
via Microsoft·08:01 AM
DescriptionSeverity
Updated
via Microsoft·08:01 AM
Affected Software
Data Sourced
via Ubuntu·03:08 PM
RemedyDescriptionSeverityAffected Software
May 16, 2026
Data Sourced
via Debian·03:10 PM
DescriptionAffected Software
Jan 25, 58467
Event
via NVD·08:11 AM

Frequently Asked Questions

1

What is the severity of CVE-2026-5172?

CVE-2026-5172 is classified as a high severity vulnerability due to its potential to allow remote code execution.

2

How do I fix CVE-2026-5172?

To remediate CVE-2026-5172, update dnsmasq to the fixed versions 2.90-4~deb12u2, 2.91-1+deb13u1, or 2.92-5.

3

What versions of dnsmasq are affected by CVE-2026-5172?

CVE-2026-5172 affects dnsmasq versions up to and including 2.85-1, 2.90-4~deb12u1, and 2.91-1.

4

Can CVE-2026-5172 cause system crashes?

Yes, CVE-2026-5172 can trigger a heap out-of-bounds read that leads to system crashes.

5

What software is impacted by CVE-2026-5172?

CVE-2026-5172 impacts the dnsmasq software used in various network configurations.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203