KernelScan.io

HIGH Introduced in 7.1

fprobe FgraphData UninitRead

CVE-2026-98540

CVSS 7.8 / 10.0 KernelScan AI

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

01

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.

02

Engine v0.9.0

Risk summary

A local attacker with tracing privileges (CAP_SYS_ADMIN or CAP_TRACE) can exploit uninitialized memory in the fprobe shadow stack to cause exit handlers to execute incorrectly — running twice or bypassing entry-handler skip decisions — leading to kernel control-flow hijack and privilege escalation. The bug is reachable from any context that can register fprobes, including containers if unprivileged tracing is enabled.

Affectedkernel/trace/fprobe.c (fprobe tracing subsystem)

Vulnerability analysis

The function-tracing subsystem reserves space on a per-call shadow stack for each registered probe that has an exit handler, but only populates entries for probes whose entry handler allows continuation. A previous optimization stopped clearing the unused portion of this reserved space. As a result, leftover data from an earlier call is mistaken for valid probe headers when the function returns, causing exit handlers to run a second time or to run despite the entry handler requesting they be skipped. The fix adds a terminating zero marker after the last valid entry and teaches the header reader to stop at a zero slot. An attacker with permission to register probes — typically a privileged process or a user in an environment where unprivileged tracing is enabled — can trigger the flaw by calling a traced function, potentially hijacking kernel control flow.

03

BranchIntroducedFixed inPatch commit
7.27.17.2.9b7459fddcb27
mainline7.17.31d653a183973