CVE-2026-68137: net/x25: fix use-after-free in x25_kill_by_neigh()
In the Linux kernel, the following vulnerability has been resolved:
net/x25: fix use-after-free in x25killbyneigh()
x25killbyneigh() walks the global X.25 socket list looking for sockets attached to a terminating neighbour. x25listlock protects list membership while the lookup is in progress, but it does not pin a socket's lifetime after the lock is dropped.
The function currently drops x25listlock before calling locksock(s). A concurrent close can run x25release(), remove the same socket from x25list, and drop the last socket reference in that window. The neighbour teardown path can then lock or inspect a freed struct sock/struct x25sock.
Take sockhold(s) while x25listlock still proves that the list entry is live, then drop the temporary reference after the socket has been locked, rechecked, and released. Recheck x25sk(s)->neighbour after locksock(), because another path may have disconnected the socket before this path acquired the socket lock. Restart the list walk after each disconnect because the list lock was dropped and the previous iterator state may no longer be valid.
A QEMU/KASAN run against origin/master reproduced a slab-use-after-free in x25killbyneigh().
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-68137?
CVE-2026-68137 has a risk rating of 48.
What type of vulnerability is CVE-2026-68137?
CVE-2026-68137 is classified as a Use After Free vulnerability in the Linux kernel.
How do I fix CVE-2026-68137?
To fix CVE-2026-68137, ensure that you update to the latest version of the Linux kernel that includes the patch for this vulnerability.
What is the impact of CVE-2026-68137?
CVE-2026-68137 can potentially lead to memory corruption and could be exploited to execute arbitrary code.
Which specific function is affected by CVE-2026-68137?
CVE-2026-68137 affects the x25_kill_by_neigh() function in the net/x25 module of the Linux kernel.