# CVE-2026-98530: kprobes: Fix permanent hang when flushing the kprobe optimizer

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.20% (percentile 5, 2026-11-28)
- **Published:** 2026-10-18T15:17:48.670Z
- **Modified:** 2026-10-19T10:19:08.410Z

## Who should check

- Anyone running Linux \>= 73c12f209462d1712c5f55f3021a1b65b2e084c3, \< f05a01fc7d4f731b4c100d2aef1e85ad77728862; \>= 73c12f209462d1712c5f55f3021a1b65b2e084c3, \< 5bfa9f1a9dcb6ecb607adbc1c0226605c972935b
- Anyone running Linux 7.0

## Description

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

kprobes: Fix permanent hang when flushing the kprobe optimizer

Writing 0 to /proc/sys/debug/kprobes-optimization while a kprobe is
jump-optimized never returns. The writer sleeps in D state forever with
kprobe\_sysctl\_mutex held, so any later read or write of that sysctl
hangs as well. For example, with vfs\_read+9 as an optimizable address
in this build:

  \# cd /sys/kernel/tracing
  \# echo 'p:myprobe vfs\_read+9' \>\> kprobe\_events
  \# echo 1 \> events/kprobes/myprobe/enable
  \# \# wait until /sys/kernel/debug/kprobes/list shows \[OPTIMIZED\]
  \# echo 0 \> /proc/sys/debug/kprobes-optimization

  INFO: task sh:246 blocked for more than 10 seconds.
  Call Trace:
   \<TASK\>
   \_\_schedule+0x1176/0x4f70
   schedule+0xdc/0x2c0
   schedule\_timeout+0x17b/0x260
   wait\_for\_completion+0x173/0x3c0
   wait\_for\_kprobe\_optimizer\_locked+0xbc/0x130
   proc\_kprobes\_optimization\_handler+0x156/0x1b0
   proc\_sys\_call\_handler+0x324/0x490
   vfs\_write+0x52d/0xfe0
   ksys\_write+0xff/0x200
   do\_syscall\_64+0x106/0x630
   entry\_SYSCALL\_64\_after\_hwframe+0x77/0x7f
   \</TASK\>
  ...
  INFO: task cat:265 is blocked on a mutex likely owned by task sh:246.

wait\_for\_kprobe\_optimizer\_locked() reinitializes optimizer\_completion,
asks the optimizer thread to flush and sleeps in wait\_for\_completion().
The thread drains the (un)optimizing lists, but calls complete() only
if completion\_done() is true, i.e. if the completion is already done,
which never happens while someone waits. disarm\_all\_kprobes() and
kprobe\_trace\_self\_tests\_init() wait the same way.

Calling complete() unconditionally would not be enough: the waiter
drops kprobe\_mutex while it sleeps, and nothing else serializes the
sysctl handler against the debugfs "enabled" file. A second flusher
that still finds the lists non-empty, e.g. because a disabled probe is
queued for unoptimizing, reinitializes the completion under the first:

  sysctl write                      debugfs "enabled" write
  unoptimize\_all\_kprobes()
    wait\_for\_kprobe\_optimizer\_locked()
      init\_completion(c)
      mutex\_unlock(&kprobe\_mutex)
      wait\_for\_completion(c)
                                    disarm\_all\_kprobes()
                                      wait\_for\_kprobe\_optimizer\_locked()
                                        init\_completion(c)
                                          // c-\>wait is reset, the first
                                          // waiter is off the queue
                                        mutex\_unlock(&kprobe\_mutex)
                                        wait\_for\_completion(c)
  kprobe\_optimizer()
    complete(c)
      // wakes the debugfs writer only

where c is &optimizer\_completion. Lining up the two writes during an
optimizer pass loses the sysctl writer this way.

Replace the completion with a counter of optimizer passes, bumped at the
end of each pass and signalled with wake\_up\_var\_locked(), both under
kprobe\_mutex. A flusher samples the count and waits with
wait\_var\_event\_mutex(), which drops kprobe\_mutex only while sleeping, so
a new count means a whole pass ran in the meantime. Nothing is
reinitialized, so several flushers can sleep in the wait at once.

## Affected and fixed versions

- Linux: \>= 73c12f209462d1712c5f55f3021a1b65b2e084c3, \< f05a01fc7d4f731b4c100d2aef1e85ad77728862; \>= 73c12f209462d1712c5f55f3021a1b65b2e084c3, \< 5bfa9f1a9dcb6ecb607adbc1c0226605c972935b (cvelist)
- Linux: 7.0 (cvelist)

## Mitigation

- Upgrade Linux to 5bfa9f1a9dcb6ecb607adbc1c0226605c972935b or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-98530. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-98530.md
Affected: Linux >= 73c12f209462d1712c5f55f3021a1b65b2e084c3, < f05a01fc7d4f731b4c100d2aef1e85ad77728862; >= 73c12f209462d1712c5f55f3021a1b65b2e084c3, < 5bfa9f1a9dcb6ecb607adbc1c0226605c972935b; Linux 7.0
Fixed in: Linux 5bfa9f1a9dcb6ecb607adbc1c0226605c972935b

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-98530 being exploited?

There is no confirmed exploitation: CVE-2026-98530 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.20% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-98530?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2026-98530?

Linux \>= 73c12f209462d1712c5f55f3021a1b65b2e084c3, \< f05a01fc7d4f731b4c100d2aef1e85ad77728862; \>= 73c12f209462d1712c5f55f3021a1b65b2e084c3, \< 5bfa9f1a9dcb6ecb607adbc1c0226605c972935b; Linux 7.0.

### Is there a fix for CVE-2026-98530?

Yes. Fixed in Linux 5bfa9f1a9dcb6ecb607adbc1c0226605c972935b. Upgrade Linux to 5bfa9f1a9dcb6ecb607adbc1c0226605c972935b or later.

### How do I check if I'm affected by CVE-2026-98530?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/f05a01fc7d4f731b4c100d2aef1e85ad77728862>
- other: <https://git.kernel.org/stable/c/5bfa9f1a9dcb6ecb607adbc1c0226605c972935b>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-98530>

HTML: <https://flawdb.com/CVE-2026-98530> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-98530>
