Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-97941 Overview
CVE-2026-97941 is a race condition in the Linux kernel's slab allocator. The flaw resides in the __slab_try_return_freelist() function introduced by commit ba7425312607 ("mm, slab: add an optimistic __slab_try_return_freelist()"). The optimistic path incorrectly assumed that no other CPU could free an object to a slab while slab->freelist was NULL and a cmpxchg succeeded. In practice, concurrent allocators can insert the slab into the partial list and begin removing it under n->list_lock, producing a classic ABA condition and corrupting kernel linked lists. Local unprivileged users can trigger the race through standard syscalls such as msgsnd().
Critical Impact
Successful exploitation triggers kernel list corruption, leading to a kernel panic (denial of service) and potentially memory corruption affecting confidentiality and integrity of the host.
Affected Products
- Linux kernel versions containing commit ba7425312607 ("mm, slab: add an optimistic __slab_try_return_freelist()")
- Development build identified in the report as 7.2.0-16172-gcf72cbb39da8-dirty
- Distributions shipping kernels based on the affected mainline revisions
Discovery Timeline
- Vulnerability reported by Hyunwoo Kim
- 2026-09-25 - CVE-2026-97941 published to NVD
- 2026-09-25 - Last updated in NVD database
Technical Details for CVE-2026-97941
Vulnerability Analysis
The defect lives in the SLUB allocator's optimistic fast path for returning freelists. __slab_try_return_freelist() attempts a lockless cmpxchg on the slab metadata to reclaim the freelist, assuming the slab is quiescent when slab->freelist is NULL. The assumption fails under concurrency.
While the optimistic path operates without n->list_lock, another CPU can free an object into the same slab, place the slab on the partial list, allocate from it, and then begin unlinking the slab from n->partial under n->list_lock. Meanwhile, __refill_objects_node() puts the slab back on pc.slabs outside n->list_lock, so it can insert the slab into a list while concurrent removal is in progress. The result is list corruption detected by __list_add_valid_or_report, which triggers kernel BUG at lib/list_debug.c:29 and a fatal panic.
The reporter's trace shows the fault reached via do_msgsnd() → load_msg() → security_msg_msg_alloc() → lsm_blob_alloc() → __kmalloc_noprof() → ___slab_alloc() → alloc_from_new_slab(), demonstrating that a local user can drive the race through SysV message queues.
Root Cause
This is a classic ABA problem [CWE-362]. The cmpxchg succeeds because the compared value is unchanged, but the slab state transitioned through intermediate steps that invalidate the optimistic assumption. Because list manipulation on n->partial is only serialized by n->list_lock, releasing that lock during the optimistic return path allows concurrent inserts and removals to collide.
Attack Vector
Exploitation requires local code execution with the ability to invoke syscalls that drive slab allocation and freeing patterns. The proof of concept uses SysV IPC (msgsnd) to allocate LSM blobs through security_msg_msg_alloc(), forcing slab churn that races the optimistic freelist return path. No elevated privileges are needed to reach the vulnerable code path.
The upstream fix reinstates list-lock discipline: the patch acquires and releases n->list_lock around the cmpxchg and add_partial() call, returning the slab directly to the partial list. This mirrors the initial design of commit ba7425312607 before the optimistic variant was introduced and reintroduces an unlikely() branch hint.
Detection Methods for CVE-2026-97941
Indicators of Compromise
- Kernel panic messages referencing __list_add_valid_or_report+0x80/0xd0 with list_add corruption text and dead000000000122 poison values.
- Call traces containing alloc_from_new_slab, ___slab_alloc, __kmalloc_noprof, and security_msg_msg_alloc immediately preceding a BUG.
- Unexpected Oops: invalid opcode entries sourced from lib/list_debug.c:29.
Detection Strategies
- Monitor /var/log/kern.log, dmesg, and journald for list_add corruption and Kernel panic - not syncing: Fatal exception events on systems running affected kernels.
- Audit running kernel versions against distribution advisories referencing commits 4a724bcf5d70 and 570a6aaf6b52.
- Correlate repeated crashes originating from unprivileged processes invoking msgsnd() or other LSM-blob allocating syscalls.
Monitoring Recommendations
- Enable kernel crash collection (kdump, systemd-coredump) to capture vmcores for post-incident triage.
- Track per-process syscall anomalies around SysV IPC and other heavy slab consumers using eBPF or auditd.
- Alert on repeated unexpected reboots or node reschedules in container and Kubernetes environments that could mask kernel panics.
How to Mitigate CVE-2026-97941
Immediate Actions Required
- Apply the upstream stable kernel updates containing the two fix commits referenced in the kernel.org advisory.
- Rebuild and redeploy custom kernels that pulled commit ba7425312607 without the follow-up fix.
- Restrict local shell and container breakout opportunities on hosts running vulnerable kernels until patching completes.
Patch Information
The fix changes __slab_try_return_freelist() to acquire n->list_lock across the cmpxchg and add_partial() call, serializing list manipulation and eliminating the ABA condition. Reference the stable tree commits 4a724bcf5d70 and 570a6aaf6b52 for the exact source changes and backport candidates.
Workarounds
- No supported runtime workaround exists; disabling SysV IPC does not eliminate the underlying slab race.
- Reduce exposure by limiting untrusted local workloads on multi-tenant systems until patched kernels are deployed.
- For container hosts, enforce seccomp profiles that constrain unnecessary IPC syscalls while scheduling patch windows.
# Verify running kernel and apply vendor updates
uname -r
# Debian / Ubuntu
sudo apt update && sudo apt install --only-upgrade linux-image-$(uname -r | sed 's/-generic//')-generic
# RHEL / Rocky / Alma
sudo dnf update kernel
# Reboot into the patched kernel
sudo systemctl reboot
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

