CVE-2025-31498

c-ares is an asynchronous resolver library. From 1.32.3 through 1.34.4, there is a use-after-free in read_answers() when process_answer() may re-enqueue a query either due to a DNS Cookie Failure or when the upstream server does not properly support EDNS, or possibly on TCP queries if the remote closed the connection immediately after a response. If there was an issue trying to put that new transaction on the wire, it would close the connection handle, but read_answers() was still expecting the connection handle to be available to possibly dequeue other responses. In theory a remote attacker might be able to trigger this by flooding the target with ICMP UNREACHABLE packets if they also control the upstream nameserver and can return a result with one of those conditions, this has been untested. Otherwise only a local attacker might be able to change system behavior to make send()/write() return a failure condition. This vulnerability is fixed in 1.34.5.
CVSS

No CVSS.

Configurations

No configuration.

History

15 Apr 2026, 00:35

Type Values Removed Values Added
Summary
  • (es) c-ares es una librería de resolución asíncrona. Desde la versión 1.32.3 hasta la 1.34.4, existe un método de use-after-free en read_answers() cuando process_answer() puede volver a poner en cola una consulta debido a un fallo de cookie DNS, a que el servidor ascendente no soporta correctamente EDNS o, posiblemente, en consultas TCP si el servidor remoto cerró la conexión inmediatamente después de una respuesta. Si hubiera un problema al intentar enviar esa nueva transacción, se cerraría el identificador de conexión, pero read_answers() seguía esperando que este estuviera disponible para, posiblemente, retirar otras respuestas de la cola. En teoría, un atacante remoto podría activar esto inundando el objetivo con paquetes ICMP UNREACHABLE si también controla el servidor de nombres ascendente y puede devolver un resultado con una de esas condiciones; esto no se ha probado. De lo contrario, solo un atacante local podría modificar el comportamiento del sistema para que send()/write() devuelva una condición de fallo. Esta vulnerabilidad se corrigió en la versión 1.34.5.

08 Apr 2025, 15:15

Type Values Removed Values Added
References
  • () http://www.openwall.com/lists/oss-security/2025/04/08/3 -

08 Apr 2025, 14:15

Type Values Removed Values Added
New CVE

Information

Published : 2025-04-08 14:15

Updated : 2026-04-15 00:35


NVD link : CVE-2025-31498

Mitre link : CVE-2025-31498

CVE.ORG link : CVE-2025-31498


JSON object : View

Products Affected

No product.

CWE
CWE-416

Use After Free