CVE-2026-98540 in Linuxinfo

Summary

by MITRE • 10/18/2026

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.

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 10/18/2026

The Linux kernel vulnerability identified involves a critical logic error within the fprobe subsystem, specifically concerning the management of shadow stack space and header parsing during function graph tracing operations. The core issue stems from an inconsistency between reservation and initialization procedures in the fgraph_data list structure. When an fprobe is registered with an exit handler, the system reserves shadow stack space via fprobe_fgraph_entry to accommodate potential return data. However, this reserved space is only populated or filled for probes where the entry handler successfully returns zero, indicating that tracing should proceed. In cases where the entry handler does not return zero, or when a probe is unregistered before its exit path is fully utilized, the allocated memory area remains uninitialized by fgraph_reserve_data. This lack of explicit clearing leaves residual data in the unused tail sections of the shadow stack.

This technical flaw leads to severe operational consequences during runtime execution. When an event occurs that triggers the return handler, specifically through the fprobe_return function, the system attempts to parse the shadow stack for headers associated with pending exit handlers. Because the unused portions were not zeroed out or properly terminated, fprobe_return interprets stale data from previous calls as valid header information. This misinterpretation causes the kernel to erroneously identify non-existent or outdated probes as active targets. Consequently, an exit handler may be invoked multiple times for a single function call, leading to double-free conditions or memory corruption issues. Alternatively, if the residual data mimics a valid but incorrect probe ID, the system might execute an exit handler that was explicitly skipped by its corresponding entry handler due to early termination logic, violating the expected control flow and potentially exposing sensitive kernel state or causing a denial of service through panic-inducing errors.

From a vulnerability classification perspective, this issue aligns with CWE-457, which describes the use of uninitialized variables, as well as CWE-823, involving object reference manipulation that allows unintended access to resources. The failure to properly initialize and terminate data structures creates an environment where memory contents are misinterpreted, leading to unpredictable behavior. In terms of attack vectors, this could be leveraged in a local privilege escalation scenario if the double execution or incorrect handler invocation leads to state corruption that compromises kernel integrity checks. It also relates to ATT&CK technique T1059, Command and Scripting Interpreter, as fprobe is often used for dynamic tracing which can be abused by attackers to monitor security controls or inject malicious logic into system calls if the underlying mechanism is unstable.

The resolution implemented addresses this root cause by ensuring strict termination of the fgraph_data list walk. A zero word is written after the last valid entry to explicitly mark the end of active probes, preventing the parser from reading beyond allocated bounds. Furthermore, the read_fprobe_header function was modified to return NULL when it encounters a zeroed slot. This change leverages architectural specifics where headers are encoded into an unsigned long with a most significant bit pattern (FPROBE_HEADER_MSB_PATTERN). Since a zero value does not decode to a valid fprobe pointer under this encoding scheme, treating it as null provides a safe and efficient boundary condition. This mitigation ensures that the tracing infrastructure correctly ignores unused or cleared slots, thereby eliminating the risk of parsing stale data.

To mitigate similar risks in kernel development, developers must ensure that all dynamically allocated structures are explicitly initialized to known states before use, particularly when those structures involve linked lists or stack-based tracking mechanisms. It is crucial to implement robust boundary checks and termination markers for any iterative processes that traverse such data structures. Regular static analysis and fuzzing of tracing subsystems can help identify these initialization gaps early in the development lifecycle. System administrators should apply kernel updates promptly once patches are available, as this vulnerability affects core debugging and profiling capabilities which, if exploited, could destabilize the entire operating system environment.

Responsible

Linux

Reservation

09/25/2026

Disclosure

10/18/2026

Moderation

accepted

EPSS

0.00000

KEV

no

Activities

very low

Sources

Want to know what is going to be exploited?

We predict KEV entries!