Bug 2497696

Summary: CVE-2026-33630 c-ares: c-ares: Use-after-free / double-free in query-completion handling [fedora-all]
Product: [Fedora] Fedora Reporter: Michalis Papadopoullos <mpapadop>
Component: c-aresAssignee: Tom "spot" Callaway <spotrh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: spotrh
Target Milestone: ---Keywords: Security, SecurityTracking
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: {"flaws": ["d9fa96dc-1cca-41e1-8ed1-2feb246734ab"]}
Fixed In Version: c-ares-1.34.7-1.fc44 c-ares-1.34.8-1.fc43 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-07-10 00:53:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michalis Papadopoullos 2026-07-07 12:31:18 UTC
Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.

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 ares_getaddrinfo() the owning host_query, 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 ares_cancel(). The callback frees the query and it is freed again after the callback returns.

2. Remotely, with no application cooperation: via ares_getaddrinfo() 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 ares_getaddrinfo()'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 host_query 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 ares_getaddrinfo() 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.

Comment 1 Fedora Update System 2026-07-07 15:15:48 UTC
FEDORA-2026-950a662010 (c-ares-1.34.7-1.fc44) has been submitted as an update to Fedora 44.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-950a662010

Comment 2 Fedora Update System 2026-07-07 15:15:52 UTC
FEDORA-2026-727e84b289 (c-ares-1.34.7-1.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-727e84b289

Comment 3 Fedora Update System 2026-07-08 01:40:39 UTC
FEDORA-2026-727e84b289 has been pushed to the Fedora 43 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-727e84b289`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-727e84b289

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 4 Fedora Update System 2026-07-08 01:52:05 UTC
FEDORA-2026-950a662010 has been pushed to the Fedora 44 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-950a662010`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-950a662010

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2026-07-10 00:53:15 UTC
FEDORA-2026-950a662010 (c-ares-1.34.7-1.fc44) has been pushed to the Fedora 44 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 6 Fedora Update System 2026-07-11 01:47:36 UTC
FEDORA-2026-d70d93fcd7 has been pushed to the Fedora 43 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-d70d93fcd7`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-d70d93fcd7

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2026-07-21 01:13:18 UTC
FEDORA-2026-d70d93fcd7 (c-ares-1.34.8-1.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.