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

net/x25: fix use-after-free of the socket by its timers

The x25 timers are armed with mod_timer() and cancelled with
timer_delete(), so a pending timer holds no reference on the socket and a
cancel does not wait for a callback already running on another CPU.

x25_heartbeat_expiry() also rearms unconditionally, so it can reinstall
sk->sk_timer after __x25_destroy_socket() has passed its cancel point.
The following __sock_put() frees the socket while the timer is still
queued, and the next expiry uses freed memory. KASAN reports a
slab-use-after-free on the kmalloc-2k object freed by close().

timer_delete_sync() cannot be used here: x25_heartbeat_expiry() and
x25_timer_expiry() both reach the cancels from inside the timer they
would wait on, through __x25_destroy_socket() and x25_disconnect().

Arm the timers with sk_reset_timer() and cancel them with sk_stop_timer()
so that an armed timer owns a reference, and release it in both expiry
handlers. Rearm the heartbeat only while sk_hashed(sk) is still true,
since __x25_destroy_socket() unlinks the socket before dropping it. Arm
the deferred destroy timer the same way and drop its reference in
x25_destroy_timer().

Reproduced on net with KASAN, with the heartbeat period shortened so the
window recurs. With this patch the reproducer no longer triggers a
report and /proc/net/x25 drains.

Discovered by XBOW, triaged by Baul Lee <baul.lee@xbow.com>
Published: 2026-08-22
Score: n/a
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

A use-after-free flaw exists in the Linux kernel’s X25 subsystem when timer callbacks reference a socket that has already been freed during close. The flaw can cause the kernel to access invalid memory, potentially leading to a crash, data corruption, or privilege escalation. The weakness is an instance of improper memory deallocation (CWE‑416).

Affected Systems

The vulnerability affects the Linux kernel. No specific kernel version range is provided in the advisories. All systems that include the X25 networking code and have the timers enabled are potentially susceptible.

Risk and Exploitability

Severity metrics are not supplied in the available data; no CVSS score or EPSS value is reported and the issue is not listed in the CISA KEV catalog. Exploitation would require presence of X25 support within the kernel, which would expose the vulnerable timers. An attacker could, by sending carefully crafted X25 packets or triggering the socket shutdown sequence, provoke the use‑after‑free, potentially causing a kernel panic or enabling further exploitation. The likely attack vector is remote network traffic over the X25 protocol, assuming the protocol remains active on the vulnerable system.

Generated by OpenCVE AI on August 22, 2026 at 17:13 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply the kernel update that resets and stops X25 timers to eliminate the use‑after‑free condition.
  • Reboot or reload the updated kernel module so the fix takes effect.
  • If immediate patching is not possible, disable X25 networking or unload the kernel module to prevent the vulnerable timers from running.
  • Continuously monitor kernel logs for KASAN or oops messages that indicate residual memory issues.

Generated by OpenCVE AI on August 22, 2026 at 17:13 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sat, 22 Aug 2026 17:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-416

Sat, 22 Aug 2026 15:45:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: net/x25: fix use-after-free of the socket by its timers The x25 timers are armed with mod_timer() and cancelled with timer_delete(), so a pending timer holds no reference on the socket and a cancel does not wait for a callback already running on another CPU. x25_heartbeat_expiry() also rearms unconditionally, so it can reinstall sk->sk_timer after __x25_destroy_socket() has passed its cancel point. The following __sock_put() frees the socket while the timer is still queued, and the next expiry uses freed memory. KASAN reports a slab-use-after-free on the kmalloc-2k object freed by close(). timer_delete_sync() cannot be used here: x25_heartbeat_expiry() and x25_timer_expiry() both reach the cancels from inside the timer they would wait on, through __x25_destroy_socket() and x25_disconnect(). Arm the timers with sk_reset_timer() and cancel them with sk_stop_timer() so that an armed timer owns a reference, and release it in both expiry handlers. Rearm the heartbeat only while sk_hashed(sk) is still true, since __x25_destroy_socket() unlinks the socket before dropping it. Arm the deferred destroy timer the same way and drop its reference in x25_destroy_timer(). Reproduced on net with KASAN, with the heartbeat period shortened so the window recurs. With this patch the reproducer no longer triggers a report and /proc/net/x25 drains. Discovered by XBOW, triaged by Baul Lee <baul.lee@xbow.com>
Title net/x25: fix use-after-free of the socket by its timers
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-22T15:32:10.135Z

Reserved: 2026-08-15T05:44:03.921Z

Link: CVE-2026-74628

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-22T16:16:35.737

Modified: 2026-08-22T16:16:35.737

Link: CVE-2026-74628

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-22T18:30:16Z

Weaknesses