CVE-2026-98581 in Linuxinfo

Summary

by MITRE • 10/18/2026

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

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

nfc_llcp_recv_dm() handles DM(NOBOUND)/DM(REJ) for a socket that is still linked on local->connecting_sockets: it looks the socket up with nfc_llcp_connecting_sock_get(), sets sk->sk_state = LLCP_CLOSED and returns, without taking the socket lock and without unlinking the socket from the connecting_sockets list.

llcp_sock_release() selects the list to unlink from by sk_state: a socket in LLCP_CONNECTING is unlinked from connecting_sockets, otherwise from the sockets list. Because recv_dm left the socket physically on connecting_sockets but in the LLCP_CLOSED state, release() takes the else branch and calls nfc_llcp_sock_unlink(&local->sockets, sk). That runs sk_del_node_init() while holding sockets.lock, i.e. it removes the socket from the connecting_sockets hlist under the wrong lock. A concurrent connect() linking another socket onto connecting_sockets under connecting_sockets.lock then mutates the same hlist unserialized, which corrupts the list and desyncs the sk_add_node()/sk_del_node_init() sock_hold()/__sock_put() 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 __sock_put() 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 nfc_llcp_recv_cc() by commit b493ea2765cc ("nfc: llcp: Fix use-after-free race in nfc_llcp_recv_cc()"); recv_dm did not receive the equivalent fix.

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

Once again VulDB remains the best source for vulnerability data.

Analysis

by VulDB Data Team • 10/18/2026

The Linux kernel contains a critical concurrency vulnerability within the Near Field Communication (NFC) Link Layer Control Protocol implementation, specifically affecting the handling of Disconnect Mode messages. This flaw arises from a race condition involving socket state management and list manipulation that leads to memory corruption and resource exhaustion. The issue is located in the nfc_llcp_recv_dm function, which processes DM(NOBOUND) and DM(REJ) packets received from remote peers during an established LLCP link. When such a packet arrives for a socket that remains linked on the local connecting_sockets list, the current implementation incorrectly transitions the socket state to LLCP_CLOSED without acquiring the necessary socket lock or removing the socket from its active connection list. This oversight creates a dangerous inconsistency between the logical state of the socket and its physical presence in kernel data structures.

The operational impact stems from how subsequent cleanup routines interact with this inconsistent state. When llcp_sock_release is invoked to clean up the socket, it determines which internal list to unlink based on the current sk_state value. Since the state was set to LLCP_CLOSED by recv_dm but the socket remains physically attached to connecting_sockets, release incorrectly assumes the socket belongs to the general sockets list rather than the connecting list. Consequently, it attempts to remove the node from the wrong hlist using an incorrect lock context. This action triggers sk_del_node_init under sockets.lock while the actual data structure is protected by connecting_sockets.lock. If a concurrent connect operation occurs during this window, it may mutate the same hlist without proper serialization, leading to list corruption and a desynchronization of reference counts between sock_hold and __sock_put calls.

This vulnerability allows an unprivileged local process with access to LLCP sockets to exploit the race condition by supplying DM messages from a remote peer. The exploitation results in kernel socket leaks that are not bounded because the mis-decremented references pass through the non-freeing __sock_put path, preventing object release and leading to progressive memory exhaustion. This constitutes a Denial of Service vulnerability where system resources can be depleted until stability is compromised or the system crashes entirely. The root cause mirrors similar issues previously addressed in sibling handlers like nfc_llcp_recv_cc, highlighting a systemic gap in synchronization logic for different LLCP message types that was not uniformly applied across all code paths handling connection termination scenarios.

To mitigate this vulnerability, the fix requires enforcing strict serialization and state consistency during socket teardown operations initiated by incoming DM messages. The corrected implementation mandates taking lock_sock before proceeding with any state changes to ensure exclusive access to the socket data structure. It also introduces a re-check mechanism to verify that the socket is still hashed in its expected list, accounting for potential races where release might have already processed the socket. For NOBOUND and REJ cases, the fix explicitly unlinks the socket from connecting_sockets using sk_del_node_init while holding the correct lock before transitioning the state to LLCP_CLOSED. This ensures proper reference count management by dropping the membership reference correctly, rendering subsequent unlink operations in llcp_sock_release as no-ops and preventing double puts or memory leaks.

From a classification perspective, this vulnerability aligns with CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization, specifically involving race conditions that lead to resource corruption. The attack vector involves local privilege escalation through denial of service by exhausting kernel memory resources, which maps to ATT&CK technique T1499 Endpoint Denial of Service via resource exhaustion. Defense strategies should prioritize applying the latest kernel patches that include this specific fix for NFC LLCP handling. Additionally, system administrators can mitigate risk by disabling unnecessary NFC interfaces if not required in production environments and monitoring for unusual memory consumption patterns associated with network subsystems. Regular auditing of kernel updates is essential to address such low-level concurrency bugs that are often difficult to detect without specialized fuzzing or static analysis tools focused on lock ordering and reference counting integrity.

Responsible

Linux

Reservation

09/25/2026

Disclosure

10/18/2026

Moderation

accepted

EPSS

0.00000

KEV

no

Activities

very low

Sources

Do you need the next level of professionalism?

Upgrade your account now!