9.8critical
net/handshake: duplicate handshake cancellations leak socket
- Severity
- 9.8critical CVSS:3.1 by Linux
- Exploit likelihood
- 0.55% (higher than 47% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Linux
Description
In the Linux kernel, the following vulnerability has been resolved: net/handshake: duplicate handshake cancellations leak socket When a handshake request is cancelled it is removed from the handshake_net->hn_requests list, but it is still present in the handshake_rhashtbl until it is destroyed. If a second cancellation request arrives for the same handshake request, then remove_pending() will return false... and assuming HANDSHAKE_F_REQ_COMPLETED isn't set in req->hr_flags, we'll continue processing through the out_true label, where we put another reference on the sock and a refcount underflow occurs. This can happen for example if a handshake times out - particularly if the SUNRPC client sends the AUTH_TLS probe to the server but doesn't follow it up with the ClientHello due to a problem with tlshd. When the timeout is hit on the server, the server will send a FIN, which triggers a cancellation request via xs_reset_transport(). When the timeout is hit on the client, another cancellation request happens via xs_tls_handshake_sync(). Add a test_and_set_bit(HANDSHAKE_F_REQ_COMPLETED) in the pending cancel path so duplicate cancels can be detected.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from 3b3009ea8abb713b022d94fba95ec270cf6e7eae before 011ae80c49d9bfa5b4336f8bd387cd25c7593663, from 3b3009ea8abb713b022d94fba95ec270cf6e7eae before e1641177e7fb48a0a5a06658d4aab51da6656659, from 3b3009ea8abb713b022d94fba95ec270cf6e7eae before 3c330f1dee3cd92b57e19b9d21dc8ce5970b09be, from 3b3009ea8abb713b022d94fba95ec270cf6e7eae before 15564bd67e2975002f2a8e9defee33e321d3183f, 6.4 Not affected: before 6.4, from 6.6.120 up to 6.6.*, from 6.12.64 up to 6.12.*, from 6.18.3 up to 6.18.*, from 6.19 up to * | CVE List |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total.
What each source says
CVE List
In the Linux kernel, the following vulnerability has been resolved: net/handshake: duplicate handshake cancellations leak socket When a handshake request is cancelled it is removed from the handshake_net->hn_requests list, but it is still present in the handshake_rhashtbl until it is destroyed. If a second cancellation request arrives for the same handshake request, then remove_pending() will return false... and assuming HANDSHAKE_F_REQ_COMPLETED isn't set in req->hr_flags, we'll continue processing through the out_true label, where we put another reference on the sock and a refcount underflow occurs. This can happen for example if a handshake times out - particularly if the SUNRPC client sends the AUTH_TLS probe to the server but doesn't follow it up with the ClientHello due to a problem with tlshd. When the timeout is hit on the server, the server will send a FIN, which triggers a cancellation request via xs_reset_transport(). When the timeout is hit on the client, another cancellation request happens via xs_tls_handshake_sync(). Add a test_and_set_bit(HANDSHAKE_F_REQ_COMPLETED) in the pending cancel path so duplicate cancels can be detected.
NVD (es)
En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: net/handshake: las cancelaciones duplicadas de handshake fugan el socket Cuando una solicitud de handshake es cancelada, es eliminada de la lista handshake_net->hn_requests, pero aún está presente en la handshake_rhashtbl hasta que es destruida. Si llega una segunda solicitud de cancelación para la misma solicitud de handshake, entonces remove_pending() devolverá falso... y asumiendo que HANDSHAKE_F_REQ_COMPLETED no está establecido en req->hr_flags, continuaremos procesando a través de la etiqueta out_true, donde ponemos otra referencia en el sock y ocurre un desbordamiento negativo del contador de referencias. Esto puede ocurrir por ejemplo si un handshake agota el tiempo de espera, particularmente si el cliente SUNRPC envía la sonda AUTH_TLS al servidor pero no la sigue con el ClientHello debido a un problema con tlshd. Cuando se alcanza el tiempo de espera en el servidor, el servidor enviará un FIN, lo que activa una solicitud de cancelación a través de xs_reset_transport(). Cuando se alcanza el tiempo de espera en el cliente, ocurre otra solicitud de cancelación a través de xs_tls_handshake_sync(). Añadir un test_and_set_bit(HANDSHAKE_F_REQ_COMPLETED) en la ruta de cancelación pendiente para que las cancelaciones duplicadas puedan ser detectadas.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-68775 changed 2026-10-19 | CVE Terms of Use |
| NVD | CVE-2025-68775 changed 2026-10-19 | Public domain |