Skip to main content
Vulnerability Database/CVE-2026-98861

CVE-2026-98861: Linux Kernel Fprobe Use-After-Free Vulnerability

CVE-2026-98861 is a use-after-free vulnerability in the Linux kernel fprobe subsystem that can occur when handlers execute outside RCU tracking. This article covers technical details, affected versions, and mitigation.

Published:

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-98861 Overview

CVE-2026-98861 is a use-after-free vulnerability in the Linux kernel's fprobe subsystem. The flaw affects unregister_fprobe() and unregister_fprobe_async(), which are used by BPF kprobe-multi. These functions rely on standard RCU grace periods via synchronize_rcu() and call_rcu() to wait for in-flight handlers before freeing fprobe structures. When an fprobe handler executes while RCU is not watching, such as inside the idle loop or nohz_full extended quiescent states, standard RCU does not track those preemption-disabled sections. The grace period completes early and the kernel can free an fprobe that is still in use.

Critical Impact

A use-after-free in fprobe handlers can lead to kernel memory corruption, local privilege escalation, or denial of service on systems that use BPF kprobe-multi tracing.

Affected Products

  • Linux kernel versions containing the fprobe subsystem prior to the fix commits
  • BPF kprobe-multi consumers relying on unregister_fprobe() / unregister_fprobe_async()
  • Kernels built with CONFIG_PROVE_LOCKING additionally experienced lockdep overhead and potential recursion

Discovery Timeline

  • 2026-10-18 - CVE-2026-98861 published to NVD
  • 2026-10-19 - Last updated in NVD database

Technical Details for CVE-2026-98861

Vulnerability Analysis

The fprobe subsystem allows BPF programs to attach to multiple kernel functions via kprobe-multi. Unregistration paths assume that synchronize_rcu() is sufficient to drain any concurrent handler execution before memory is released. This assumption breaks when handlers run in contexts where RCU is not watching, including CPU idle paths and nohz_full extended quiescent states. In those contexts, classic RCU does not observe the preempt-disabled critical section as part of a grace period. The unregister path can therefore return and free the fprobe object while a handler on another CPU still holds references to it.

A secondary issue existed in the fast path. fprobe_fgraph_entry() and fprobe_ftrace_entry() used guard(rcu)() and rcu_read_lock(), which invoke lockdep on every probe hit when CONFIG_PROVE_LOCKING is enabled. This produced measurable overhead and risked lockdep recursion when probed functions themselves interacted with lockdep.

Root Cause

The root cause is a mismatch between the RCU flavor used by the unregister path and the execution context of fprobe handlers. Handlers can execute during extended quiescent states that synchronize_rcu() does not account for, violating the invariant that all handlers have exited before the fprobe is freed [CWE-416].

Attack Vector

Exploitation requires the ability to load or attach BPF kprobe-multi programs, typically restricted to privileged local users holding CAP_BPF or CAP_SYS_ADMIN. A local attacker who can register and rapidly unregister kprobe-multi programs targeting functions that run in idle or nohz_full contexts can race the handler against the free path. Successful exploitation leads to kernel memory corruption via use-after-free. Remote exploitation is not applicable because the attack surface is local to the kernel's BPF tracing interface. The fix introduces an early return in handlers when !rcu_is_watching() and switches the fast path to guard(rcu_sched_notrace)(), which uses rcu_read_lock_sched_notrace() to hold preemption disabled without lockdep overhead. Because rhltable_lookup() and rhl_for_each_entry_rcu() validate via rcu_dereference_all_check(), preempt-disabled synchronization is sufficient.

Detection Methods for CVE-2026-98861

Indicators of Compromise

  • Unexpected kernel oops or general protection fault messages originating from fprobe_ftrace_entry, fprobe_fgraph_entry, or fprobe_return in dmesg
  • KASAN use-after-free reports referencing fprobe structures on kernels built with address sanitizer enabled
  • Unexplained kernel panics on hosts with active BPF kprobe-multi tracing workloads

Detection Strategies

  • Audit loaded BPF programs with bpftool prog show and correlate kprobe-multi attachments against expected tracing tooling baselines
  • Enable CONFIG_KASAN in non-production kernels to surface the use-after-free pattern during fuzzing or testing
  • Monitor /sys/kernel/tracing and audit logs for repeated attach/detach cycles targeting idle-path or scheduler functions

Monitoring Recommendations

  • Alert on new processes invoking bpf() syscalls with BPF_LINK_CREATE for kprobe-multi from non-standard binaries
  • Collect kernel ring buffer output centrally and search for fprobe stack frames in crash signatures
  • Track grants of CAP_BPF and CAP_SYS_ADMIN to workloads and flag deviations

How to Mitigate CVE-2026-98861

Immediate Actions Required

  • Apply the upstream Linux kernel fix commits as soon as vendor-rebuilt packages are available
  • Restrict CAP_BPF and CAP_SYS_ADMIN to trusted administrative accounts and workloads
  • Inventory hosts running BPF-based tracing agents and prioritize patching those first

Patch Information

The fix is distributed across three upstream commits that define and apply guard(rcu_sched_notrace)() across fprobe_ftrace_entry(), fprobe_fgraph_entry(), and fprobe_return(), and add an early exit when rcu_is_watching() returns false. See Linux Kernel Commit a85d0f0, Linux Kernel Commit dd4a0d4, and Linux Kernel Commit e0a6249.

Workarounds

  • Disable unprivileged BPF by setting kernel.unprivileged_bpf_disabled=1 via sysctl where operationally feasible
  • Remove or constrain non-essential BPF kprobe-multi tracing agents until patched kernels are deployed
  • Avoid enabling nohz_full on hosts where untrusted tracing workloads may be executed
bash
# Disable unprivileged BPF usage
sudo sysctl -w kernel.unprivileged_bpf_disabled=1
echo 'kernel.unprivileged_bpf_disabled=1' | sudo tee /etc/sysctl.d/90-bpf.conf

# Verify installed kernel version includes the fix
uname -r

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

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.