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

net/x25: fix use-after-free in x25_kill_by_neigh()

x25_kill_by_neigh() walks the global X.25 socket list looking for sockets
attached to a terminating neighbour. x25_list_lock 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 x25_list_lock before calling lock_sock(s). A
concurrent close can run x25_release(), remove the same socket from
x25_list, and drop the last socket reference in that window. The neighbour
teardown path can then lock or inspect a freed struct sock/struct x25_sock.

Take sock_hold(s) while x25_list_lock still proves that the list entry is
live, then drop the temporary reference after the socket has been locked,
rechecked, and released. Recheck x25_sk(s)->neighbour after lock_sock(),
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
x25_kill_by_neigh().
Published: 2026-08-10
Score: n/a
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

An improper reference release in the Linux kernel’s X.25 networking subsystem allows an attacker to trigger a use‑after‑free in the function x25_kill_by_neigh(). The flaw occurs when the function drops the list lock before obtaining a socket lock, permitting a concurrent close to free the socket while the iterator is still in use. This results in a memory corruption that can be abused to inject arbitrary code or halt the kernel, a classic example of CWE‑416. The official description acknowledges that the fix eliminates a slab-use-after-free detected by KASAN during testing.

Affected Systems

The affected product is the Linux kernel, with no specific release numbers given in the advisory. The vulnerability exists in the origin/master branch and any kernels compiling that code prior to the applied commits. No vendor‑specific version strings are supplied.

Risk and Exploitability

The EPSS score is not available and the vulnerability is not listed in CISA’s KEV catalog, so the observable exploit likelihood is unknown. However, based on the nature of the flaw and its potential to allow arbitrary code execution, the risk is considered significant for systems that expose X.25 networking. The likely attack vector is through network traffic that invokes the X.25 protocol; an attacker could send crafted packets to a host that has the vulnerable code loaded. The absence of a CVSS score means the severity cannot be quantified, but typical use‑after‑free conditions in the kernel are often considered high impact.

Generated by OpenCVE AI on August 10, 2026 at 14:10 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply a kernel update that includes the patches referenced in the advisory commits. The patched code removes the premature lock release and adds an extra reference count and recheck logic to prevent access to freed structures.
  • If an immediate kernel upgrade is not possible, manually apply the backport commits from the provided Git URLs or patch the kernel source to include the same reference‑counting and re‑walk logic.
  • Until a fix can be applied, disable or block X.25 traffic on affected hosts or prevent the kernel from loading the X.25 module to eliminate the attack surface.

Generated by OpenCVE AI on August 10, 2026 at 14:10 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 10 Aug 2026 14:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-416

Mon, 10 Aug 2026 12:30:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: net/x25: fix use-after-free in x25_kill_by_neigh() x25_kill_by_neigh() walks the global X.25 socket list looking for sockets attached to a terminating neighbour. x25_list_lock 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 x25_list_lock before calling lock_sock(s). A concurrent close can run x25_release(), remove the same socket from x25_list, and drop the last socket reference in that window. The neighbour teardown path can then lock or inspect a freed struct sock/struct x25_sock. Take sock_hold(s) while x25_list_lock still proves that the list entry is live, then drop the temporary reference after the socket has been locked, rechecked, and released. Recheck x25_sk(s)->neighbour after lock_sock(), 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 x25_kill_by_neigh().
Title net/x25: fix use-after-free in x25_kill_by_neigh()
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-08-10T11:59:00.740Z

Reserved: 2026-07-30T09:28:09.370Z

Link: CVE-2026-68137

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-10T14:15:03Z

Weaknesses