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-98789 Overview
CVE-2026-98789 affects the Linux kernel's Berkeley Packet Filter (BPF) subsystem. The vulnerability stems from objects becoming stuck in the free_by_rcu_ttrace list within the BPF memory allocator. When do_call_rcu_ttrace() returns early because call_rcu_ttrace_in_progress is set, objects added to free_by_rcu_ttrace during an in-flight RCU tasks trace grace period remain unprocessed. These objects stay queued until free_bulk() or alloc_bulk() is called again for the same bpf_mem_cache, which may never happen. The number of leaked objects is unbounded, leading to a kernel memory leak condition.
Critical Impact
Unbounded kernel memory leak in BPF memory caches that can lead to resource exhaustion over time.
Affected Products
- Linux Kernel (BPF subsystem)
- Distributions shipping affected upstream kernel versions
- Systems running BPF programs that create and destroy hash maps
Discovery Timeline
- 2026-10-18 - CVE-2026-98789 published to NVD
- 2026-10-19 - Last updated in NVD database
Technical Details for CVE-2026-98789
Vulnerability Analysis
The vulnerability resides in the BPF memory allocator's reclamation path for RCU tasks trace protected objects. The function do_call_rcu_ttrace() queues __free_rcu() as an RCU tasks trace callback. When a prior callback is in flight, it exits early without preserving the pending work. The callback __free_rcu() only frees items on waiting_for_gp_ttrace and then clears the in-progress flag. Any objects placed on free_by_rcu_ttrace while the grace period was active remain orphaned on the list.
Since the list only drains when free_bulk() or alloc_bulk() is invoked for the same bpf_mem_cache, idle caches never release the stuck objects. The leak scales with BPF map churn and is unbounded.
Root Cause
The root cause is a race condition between concurrent reclamation attempts and RCU grace period completion. The single-bit call_rcu_ttrace_in_progress flag cannot represent the state where additional objects arrived after the callback was queued. The fix converts the flag into a tri-state value: 0 for idle, 1 for queued, and 2 for queued with additional pending objects. The callback uses cmpxchg(1 -> 0) and starts the next grace period when the compare-and-swap fails.
Attack Vector
The condition is triggered by workloads that repeatedly create and destroy BPF hash maps across multiple CPUs. A local actor with permissions to load BPF programs or create BPF maps can accelerate the leak. The upstream fix also addresses a secondary issue in bpf_mem_alloc_destroy() where the destruction path could race with queued callbacks after rcu_barrier_tasks_trace(). The resolution adds a synchronize_rcu() call before the barriers to guarantee callbacks queued under rcu_read_lock() are observed. See the upstream patches at Kernel Git Commit 33d0a5d and Kernel Git Commit fbd97dd for the complete diff.
Detection Methods for CVE-2026-98789
Indicators of Compromise
- Progressive growth of kernel slab memory attributable to BPF allocations in /proc/slabinfo
- Rising MemAvailable consumption on hosts running BPF-heavy workloads with no corresponding user-space footprint
- Kernel workers (kworker) accumulating when BPF hash maps are created and destroyed in loops
Detection Strategies
- Monitor BPF memory allocator statistics via bpftool map show and track delta over time for anomalies
- Compare running kernel version against the fixed commits referenced in the upstream repository
- Audit workloads using BPF for cyclical map creation and destruction patterns that amplify the leak
Monitoring Recommendations
- Instrument kernel memory telemetry collection and alert on sustained slab growth without workload justification
- Track kernel version inventory across the fleet to identify unpatched hosts
- Correlate BPF program load events with memory pressure signals to surface at-risk nodes
How to Mitigate CVE-2026-98789
Immediate Actions Required
- Identify all Linux hosts running kernel versions that lack the upstream fix commits
- Prioritize patching for systems that execute third-party BPF programs or support multi-tenant workloads
- Restrict CAP_BPF and CAP_SYS_ADMIN to trusted service accounts to limit who can trigger BPF map churn
Patch Information
The fix is available in the upstream Linux kernel through two commits: Kernel Git Commit 33d0a5d and Kernel Git Commit fbd97dd. Apply the stable kernel update from your distribution vendor once backported releases are available. Reboot affected systems after installation to load the patched kernel image.
Workarounds
- Avoid workloads that repeatedly create and destroy BPF hash maps in tight loops across many CPUs
- Limit BPF map creation privileges through Linux Security Modules such as SELinux or AppArmor policies
- Schedule periodic reboots on long-running hosts to reclaim leaked kernel memory until a patched kernel is deployed
# Verify running kernel version and check for the fix
uname -r
# Review loaded BPF programs and maps
bpftool prog show
bpftool map show
# Inspect BPF-related slab allocations
grep -i bpf /proc/slabinfo
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

