CVE-2026-68137

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

State
Published
Severity
9.8 Critical
Published
Aug 10, 2026
Updated
Aug 19, 2026
Reserved
Jul 30, 2026

Read the record on cve.org

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().

Scores

CVSSScoreVectorSource
3.19.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HLinux

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 5c94b6205e87411dbe9dc1ca088eb36b8837fb47 to before db6b04f6d65549bb1c7bc8e64a92e7b7d03be676Affected
  • 409570a619c1cda2e0fde6018a256b9e3d3ba0ee to before 5e8a754ac2009a88a7b99ab61eab6296eed360f3Affected
  • 7781607938c8371d4c2b243527430241c62e39c2 to before c98a454d1a9e1bd09d5fd55a7aa589b199340b88Affected
  • 7781607938c8371d4c2b243527430241c62e39c2 to before 3f4fe26c20c30bd5a2e2583e80685def0b27858cAffected
  • 7781607938c8371d4c2b243527430241c62e39c2 to before 610678d4be94b619c751572e8a58de705592cd07Affected
  • 7781607938c8371d4c2b243527430241c62e39c2 to before ec6d91a1bf2ebd767d3d43f6d249ee0ed3f4558aAffected
  • 7781607938c8371d4c2b243527430241c62e39c2 to before 9aabda553184346f74810e2ee1d96920b4612e3fAffected
  • 7781607938c8371d4c2b243527430241c62e39c2 to before 5499e0602d2faafd42c580d25f615903c3fbe11bAffected
  • dffc859d1d9560da594e4282091781b8d2715f00Affected
  • 858642789ada1b48630f322e59416ca9fca3e6b7Affected
  • 4c240c5a105557e4546d0836e694868f22fd09b0Affected
  • 9acf05b4e7b55fdb712ef7b331dbce5bcd391d0fAffected
  • 4a279d7ee1c65411b4055ecd428b8aa2b1711c1fAffected
  • 671529db75e6be777bb1c76aa07c2bdd2992be6dAffected
  • 5.10.110 to before 5.10.265Affected
  • 5.15.33 to before 5.15.216Affected
  • 4.9.311 to before 4.10Affected
  • 4.14.276 to before 4.15Affected
  • 4.19.238 to before 4.20Affected
  • 5.4.189 to before 5.5Affected
  • 5.16.19 to before 5.17Affected
  • 5.17.2 to before 5.18Affected
LinuxLinux
  • 5.18Affected
  • before 5.18Not affected
  • 5.10.265 through 5.10.*Not affected
  • 5.15.216 through 5.15.*Not affected
  • 6.1.183 through 6.1.*Not affected
  • 6.6.148 through 6.6.*Not affected
  • 6.12.101 through 6.12.*Not affected
  • 6.18.42 through 6.18.*Not affected
  • 7.1.6 through 7.1.*Not affected
  • 7.2 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.