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

CVE-2026-98530: Linux Kernel Kprobe Optimizer DOS Vulnerability

CVE-2026-98530 is a denial of service flaw in the Linux kernel kprobe optimizer that causes permanent system hangs when flushing optimized kprobes. This article covers the technical details, affected versions, and mitigation strategies.

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

CVE-2026-98530 is a Linux kernel denial-of-service flaw in the kprobes subsystem. Writing 0 to /proc/sys/debug/kprobes-optimization while a kprobe is jump-optimized never returns. The writer sleeps in uninterruptible (D) state indefinitely while holding kprobe_sysctl_mutex. Any later read or write of that sysctl then hangs on the held mutex. The same hang path is reachable from disarm_all_kprobes() and kprobe_trace_self_tests_init(). The issue requires local privileged access to the sysctl interface, limiting its exploitation surface to the host.

Critical Impact

A local user with privileges to write the kprobes-optimization sysctl can permanently wedge the kprobe optimizer thread and block subsequent accesses to the interface, degrading kernel observability and tracing.

Affected Products

  • Linux kernel builds with CONFIG_OPTPROBES enabled
  • Stable kernel trees prior to the fixes referenced in commits 5bfa9f1 and f05a01f
  • Systems exposing /proc/sys/debug/kprobes-optimization to privileged tooling

Discovery Timeline

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

Technical Details for CVE-2026-98530

Vulnerability Analysis

The defect lives in wait_for_kprobe_optimizer_locked(). The function reinitializes optimizer_completion, asks the optimizer thread to flush, and sleeps in wait_for_completion(). The optimizer thread drains the optimizing and unoptimizing lists but only calls complete() when completion_done() is already true. That condition is never met while a waiter is queued, so the waiter sleeps forever.

Making complete() unconditional is not sufficient. The waiter drops kprobe_mutex while sleeping, and nothing serializes the sysctl handler against the debugfs enabled writer. A second flusher that still finds the lists non-empty reinitializes the completion under the first. The reinitialization resets c->wait, removing the earlier waiter from the queue. The next complete() call wakes only the second writer, leaving the first blocked.

Root Cause

The root cause is unsafe reuse of a struct completion across concurrent flushers. Reinitializing the completion while another task waits on it loses that waiter. Combined with the conditional complete() call in kprobe_optimizer(), the pattern produces a deterministic deadlock between the sysctl handler and the debugfs enabled path.

Attack Vector

Triggering the hang requires local root or CAP_SYS_ADMIN to write the kprobes sysctl. An operator (or malicious automation) enables an optimizable kprobe through tracefs, waits until it reports [OPTIMIZED], then writes 0 to /proc/sys/debug/kprobes-optimization. The write blocks indefinitely in wait_for_completion(). Subsequent reads or writes of the same sysctl inherit the held kprobe_sysctl_mutex and also hang. Observed stack frames include wait_for_kprobe_optimizer_locked+0xbc/0x130 and proc_kprobes_optimization_handler+0x156/0x1b0.

The upstream fix replaces the completion with a pass counter signaled via wake_up_var_locked() and awaited with wait_var_event_mutex(), allowing multiple flushers to sleep concurrently without state reset.

Detection Methods for CVE-2026-98530

Indicators of Compromise

  • Kernel log entries reporting INFO: task <name>:<pid> blocked for more than 10 seconds with wait_for_kprobe_optimizer_locked in the stack trace.
  • Processes stuck in D state while holding or waiting on kprobe_sysctl_mutex, visible in /proc/<pid>/stack.
  • Writes to /proc/sys/debug/kprobes-optimization that never return control to the caller.

Detection Strategies

  • Alert on hung_task kernel messages that reference kprobe optimizer symbols such as wait_for_kprobe_optimizer_locked or kprobe_optimizer.
  • Audit write syscalls against /proc/sys/debug/kprobes-optimization and correlate with task state changes to uninterruptible sleep.
  • Track disarm_all_kprobes() invocations triggered by writes to debugfs kprobes/enabled concurrent with sysctl writes.

Monitoring Recommendations

  • Enable kernel.hung_task_timeout_secs and forward hung task warnings to centralized logging for correlation.
  • Watch for sustained growth of D-state task counts on hosts running tracing or performance instrumentation workloads.
  • Baseline normal usage of kprobes sysctl toggles so unusual flush attempts stand out.

How to Mitigate CVE-2026-98530

Immediate Actions Required

  • Apply the stable kernel updates containing commits 5bfa9f1a9dcb6ecb607adbc1c0226605c972935b and f05a01fc7d4f731b4c100d2aef1e85ad77728862.
  • Restrict write access to /proc/sys/debug/kprobes-optimization to a minimal set of trusted administrators and automation accounts.
  • Avoid toggling kprobes-optimization while optimized kprobes are active until the patch is deployed.

Patch Information

The upstream fix removes the shared optimizer_completion and replaces it with a monotonically incremented pass counter. The counter is bumped at the end of each optimizer pass and signaled with wake_up_var_locked() under kprobe_mutex. Flushers sample the counter and sleep with wait_var_event_mutex(), which releases kprobe_mutex only while sleeping. Nothing is reinitialized, so multiple flushers can wait concurrently. See Kernel Git Commit 5bfa9f1 and Kernel Git Commit f05a01f.

Workarounds

  • Disable CONFIG_OPTPROBES in custom kernel builds where jump-optimized kprobes are not required.
  • Use sysctl -w only through controlled scripts that confirm no kprobes are currently optimized before writing 0.
  • Reboot affected hosts to clear a stuck optimizer state; no live recovery is possible once the mutex is held.
bash
# Verify the running kernel includes the fix commits
uname -r
git -C /path/to/linux log --oneline | grep -E '5bfa9f1a9dcb|f05a01fc7d4f'

# List currently optimized kprobes before toggling the sysctl
cat /sys/kernel/debug/kprobes/list | grep '\[OPTIMIZED\]'

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.