CVE-2026-33630: c-ares : Use-after-free / double-free in c-ares query-completion handling, remotely triggerable via ares_getaddrinfo() over TCP

Published Jul 6, 2026
·
Updated

A use-after-free / double-free vulnerability was found in c-ares' query-completion handling. The same flaw — a query's callback being invoked while the query is still linked in the channel's internal lookup structures — is present at multiple points in the resend/finish path (timeout handling, response handling, and query dispatch). If the query, or for aresgetaddrinfo() the owning hostquery, is freed as a side effect of that callback, it is then accessed and/or freed a second time.

It is reachable in two ways:

1. Application-triggered: a callback that re-enters c-ares, for example by calling arescancel(). The callback frees the query and it is freed again after the callback returns.

2. Remotely, with no application cooperation: via aresgetaddrinfo() over TCP. A malicious or on-path DNS server that returns a FORMERR without an OPT record (forcing an EDNS-downgrade retry), then a second response with the same query id, then resets the connection, causes aresgetaddrinfo()'s internal completion handler to re-enter (issuing a follow-on lookup whose send fails on the reset connection and completes immediately) and access a hostquery that has already been freed. An attacker can force a client onto TCP by setting the truncation (TC) bit in a UDP response.

This was reproduced deterministically under AddressSanitizer (heap-use-after-free in the aresgetaddrinfo() completion handler) against v1.34.6 and the development branch, using only the public API and the standard system allocator.

The same pattern was previously addressed at one call site under CVE-2025-31498; CVE-2026-33630 covers the remaining occurrences.

The consequence is memory corruption leading to a crash (denial of service); a use-after-free may have further impact depending on the allocator and build. Reliable code execution has not been demonstrated.

Fixed in c-ares 1.34.7.

Other sources

c-ares : Use-after-free / double-free in c-ares query-completion handling, remotely triggerable via aresgetaddrinfo() over TCP

— Microsoft

c-ares is an asynchronous resolver library. From ver 1.32.3 until 1.34.7, a use-after-free / double-free in c-ares' query-completion handling. The same flaw — a query's callback being invoked while the query is still linked in the channel's internal lookup structures — is present at multiple points in the resend/finish path (timeout handling, response handling, and query dispatch). If the query, or for aresgetaddrinfo() the owning hostquery, is freed as a side effect of that callback, it is then accessed and/or freed a second time. This vulnerability is fixed in ver 1.34.7.

— MITRE

Affected Software

3 affected componentsFixes available
c-ares c-ares>1.32.3<=1.34.7
Microsoft azl3 fluent-bit 3.1.10-6<3.1.10-7
3.1.10-7
debian/c-ares<=1.34.5-1+deb13u1
1.18.1-31.34.8-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 3.1.10-7
  2. Upgrade

    Upgrade debian/c-ares to a version that resolves this vulnerability.

    Fixed in 1.18.1-3Fixed in 1.34.8-1
  3. Upgrade

    Upgrade c-ares to a version that resolves this vulnerability.

    Fixed in 1.34.7

Event History

Jul 7, 2026
Data Sourced
via Red Hat·12:05 PM
DescriptionSeverityAffected Software
Sep 3, 2026
CVE Published
via MITRE·06:42 PM
Data Sourced
via MITRE·06:42 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·07:17 PM
DescriptionSeverityWeakness
Sep 5, 2026
Data Sourced
via Microsoft·08:25 AM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which deployments are exposed to remote exploitation?

Applications using c-ares through ares_getaddrinfo() and performing DNS resolution over TCP are described as remotely triggerable. The affected versions are 1.32.3 through 1.34.7.

2

Does exploitation require an authenticated user or user interaction?

No. The supplied vector indicates network access, low attack complexity, no privileges required, and no user interaction.

3

What is the remediation?

Update c-ares to the fixed 1.34.7 release. The provided data does not identify a workaround for environments that cannot patch immediately.

4

What behavior indicates an affected application path?

The vulnerable condition occurs when a query callback frees the query, or when an ares_getaddrinfo() callback frees its owning host_query, while it remains linked in c-ares internal lookup structures. Subsequent processing can then access or free that object again.

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