Skip to contentSkip to conversation

CVE-2026-98540: fprobe: Terminate the fgraph_data list when the reservation is not filled

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Oct 18

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

fprobe: Terminate the fgraph_data list when the reservation is not filled

fprobe_fgraph_entry() reserves shadow stack space for every fprobe with an exit handler, but only fills it for those whose entry handler returns
0. fgraph_reserve_data() does not clear the area, so fprobe_return() parses the unused tail as headers left over from an earlier call, and an exit handler can run twice or despite its entry handler asking to skip it.

Write a zero word after the last entry to terminate the walk. A zeroed slot does not decode to a NULL fprobe on the arches that encode the header into one unsigned long, since arch_decode_fprobe_header_fp() ORs in FPROBE_HEADER_MSB_PATTERN, so make read_fprobe_header() return NULL for a zeroed slot.

The Linux kernel CVE team has assigned CVE-2026-98540 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 7.1 with commit e0a384434ae1bdfb03954c46c464e3dbd3223ad6 and fixed in 7.2.9 with commit b7459fddcb27a4b7d01067678172afa362cf660d
	Issue introduced in 7.1 with commit e0a384434ae1bdfb03954c46c464e3dbd3223ad6 and fixed in 7.3-rc5 with commit 1d653a183973f5283a3db5a38cd5e195eb152244

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-98540

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/trace/fprobe.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/b7459fddcb27a4b7d01067678172afa362cf660d
	https://git.kernel.org/stable/c/1d653a183973f5283a3db5a38cd5e195eb152244