CVE-2026-31629
JSON

8.8high

nfc: llcp: add missing return after LLCP_CLOSED checks

Severity
8.8high CVSS:3.1 by Linux
Exploit likelihood
0.27% (higher than 19% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

Description

In the Linux kernel, the following vulnerability has been resolved: nfc: llcp: add missing return after LLCP_CLOSED checks In nfc_llcp_recv_hdlc() and nfc_llcp_recv_disc(), when the socket state is LLCP_CLOSED, the code correctly calls release_sock() and nfc_llcp_sock_put() but fails to return. Execution falls through to the remainder of the function, which calls release_sock() and nfc_llcp_sock_put() again. This results in a double release_sock() and a refcount underflow via double nfc_llcp_sock_put(), leading to a use-after-free. Add the missing return statements after the LLCP_CLOSED branches in both functions to prevent the fall-through.

Affected

Product or packageVersionsReported by
Linux Linuxfrom d646960f7986fefb460a2b062d5ccc8ccfeacc3a before b2a23529593d011fb433a3d711fc597ed6a6bd2f, from d646960f7986fefb460a2b062d5ccc8ccfeacc3a before 665315df9c3486cb213fc44d83cc8bcd47fe0d26, from d646960f7986fefb460a2b062d5ccc8ccfeacc3a before 9b49e2a4b8219a2fc5cebf94f4ec34e509aff8a6, from d646960f7986fefb460a2b062d5ccc8ccfeacc3a before 0eb1263a3b8c36418c9ba295c9ab3abed664edbf, from d646960f7986fefb460a2b062d5ccc8ccfeacc3a before 796e0cac058252d0ad34ebe288e6f7979b5fc9b2, from d646960f7986fefb460a2b062d5ccc8ccfeacc3a before 8977fad2b3c6eefd414131168d597c5d1d5e1abf, from d646960f7986fefb460a2b062d5ccc8ccfeacc3a before ff3d9e8f7244293e303f7b6ef70774291c7c27e9, from d646960f7986fefb460a2b062d5ccc8ccfeacc3a before aba4712e8f0381cd5d196534ce2ad082626a5ab6 and 2 more
Not affected: before 3.3, from 5.10.258 up to 5.10.*, from 5.15.209 up to 5.15.*, from 6.1.175 up to 6.1.*, from 6.6.136 up to 6.6.*, from 6.12.83 up to 6.12.*
CVE List
linux linux_kernelfrom 3.3 before 6.6.136, from 6.7 before 6.12.83, from 6.13 before 6.18.24, from 6.19 before 6.19.14, from 7.0 before 7.0.1NVD

Classification

What each source says

CVE List

In the Linux kernel, the following vulnerability has been resolved: nfc: llcp: add missing return after LLCP_CLOSED checks In nfc_llcp_recv_hdlc() and nfc_llcp_recv_disc(), when the socket state is LLCP_CLOSED, the code correctly calls release_sock() and nfc_llcp_sock_put() but fails to return. Execution falls through to the remainder of the function, which calls release_sock() and nfc_llcp_sock_put() again. This results in a double release_sock() and a refcount underflow via double nfc_llcp_sock_put(), leading to a use-after-free. Add the missing return statements after the LLCP_CLOSED branches in both functions to prevent the fall-through.

NVD (es)

En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: nfc: llcp: añadir retorno faltante después de las comprobaciones de LLCP_CLOSED En nfc_llcp_recv_hdlc() y nfc_llcp_recv_disc(), cuando el estado del socket es LLCP_CLOSED, el código llama correctamente a release_sock() y nfc_llcp_sock_put() pero no retorna. La ejecución continúa hacia el resto de la función, que llama a release_sock() y nfc_llcp_sock_put() de nuevo. Esto resulta en una doble llamada a release_sock() y un subdesbordamiento del contador de referencias a través de una doble llamada a nfc_llcp_sock_put(), lo que lleva a un uso después de liberación. Añadir las sentencias ’return’ faltantes después de las ramas LLCP_CLOSED en ambas funciones para evitar el paso directo.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-31629 changed 2026-10-15CVE Terms of Use
NVDCVE-2026-31629 changed 2026-11-11Public domain