CVE-2026-98856: kprobes: Skip disarmed probes when checking optkprobe overlap
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
kprobes: Skip disarmed probes when checking optkprobe overlap
On x86, an optkprobe at A replaces five bytes with a jump. If a disabled probe B is at A+2, get_optimized_kprobe() stops at B when arming a new probe C at A+4. It leaves A optimized:
A A+1 A+2 A+3 A+4 A's jump | e9 | d0 | d1 | d2 | d3 | after C | e9 | d0 | d1 | d2 | cc |
The INT3 for C overwrites the last byte of A's jump displacement, so execution can jump to the wrong address. B can have prepared optinsns while disarmed, but has no jump to unoptimize.
Continue past disarmed and unprepared probes to find the active optimized probe before arming a probe in its jump.
The Linux kernel CVE team has assigned CVE-2026-98856 to this issue.
Affected and fixed versions
===========================
Issue introduced in 2.6.34 with commit afd66255b9a48f5851326ddae50e2203fbf71dc9 and fixed in 6.12.113 with commit 985a568171e7bdba6dcde3420d0e5bb515813457 Issue introduced in 2.6.34 with commit afd66255b9a48f5851326ddae50e2203fbf71dc9 and fixed in 6.18.56 with commit 6745fa65f4115045431c0c15610e876855a04625 Issue introduced in 2.6.34 with commit afd66255b9a48f5851326ddae50e2203fbf71dc9 and fixed in 7.2.10 with commit 526fac219e8b7d3369b43026bd0a1df51b811cd4 Issue introduced in 2.6.34 with commit afd66255b9a48f5851326ddae50e2203fbf71dc9 and fixed in 7.3-rc6 with commit 7a39c732a22ec4a369af9e19fbe3d666ec83eec4
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-98856
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
kernel/kprobes.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/985a568171e7bdba6dcde3420d0e5bb515813457 https://git.kernel.org/stable/c/6745fa65f4115045431c0c15610e876855a04625 https://git.kernel.org/stable/c/526fac219e8b7d3369b43026bd0a1df51b811cd4 https://git.kernel.org/stable/c/7a39c732a22ec4a369af9e19fbe3d666ec83eec4