CVE-2026-98581: nfc: llcp: Fix list corruption / refcount desync in nfc_llcp_recv_dm()

Published Oct 18, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

nfc: llcp: Fix list corruption / refcount desync in nfcllcprecvdm()

nfcllcprecvdm() handles DM(NOBOUND)/DM(REJ) for a socket that is still linked on local->connectingsockets: it looks the socket up with nfcllcpconnectingsockget(), sets sk->skstate = LLCPCLOSED and returns, without taking the socket lock and without unlinking the socket from the connectingsockets list.

llcpsockrelease() selects the list to unlink from by skstate: a socket in LLCPCONNECTING is unlinked from connectingsockets, otherwise from the sockets list. Because recvdm left the socket physically on connectingsockets but in the LLCPCLOSED state, release() takes the else branch and calls nfcllcpsockunlink(&local->sockets, sk). That runs skdelnodeinit() while holding sockets.lock, i.e. it removes the socket from the connectingsockets hlist under the wrong lock. A concurrent connect() linking another socket onto connectingsockets under connectingsockets.lock then mutates the same hlist unserialized, which corrupts the list and desyncs the skaddnode()/skdelnodeinit() sockhold()/sockput() pairing. An unprivileged local process holding LLCP sockets, with the DM supplied by the remote peer over an established LLCP link, can drive this to leak kernel sockets without bound (the mis-decrement goes through the non-freeing sockput() path, so the object is never released), leading to memory exhaustion / DoS.

This is the same class of bug that was fixed in the sibling handler nfcllcprecvcc() by commit b493ea2765cc ("nfc: llcp: Fix use-after-free race in nfcllcprecvcc()"); recvdm did not receive the equivalent fix.

Fix it the same way: take locksock(), re-check that the socket is still hashed (release() may have won the race), and for the NOBOUND/REJ case unlink it from connectingsockets before moving it to LLCPCLOSED. The unlink drops the connectingsockets membership reference via skdelnodeinit(), leaving the socket unhashed, so the later nfcllcpsockunlink() in llcpsockrelease() becomes a no-op and no double put occurs.

Affected Software

1 affected component
Linux Linux kernel

Event History

Oct 18, 2026
CVE Published
via MITRE·03:18 PM
Data Sourced
via MITRE·03:18 PM
Description
Data Sourced
via NVD·04:17 PM
Description

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