VYPR
Unrated severityNVD Advisory· Published Dec 24, 2025· Updated Apr 15, 2026

CVE-2023-54139

CVE-2023-54139

Description

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

tracing/user_events: Ensure write index cannot be negative

The write index indicates which event the data is for and accesses a per-file array. The index is passed by user processes during write() calls as the first 4 bytes. Ensure that it cannot be negative by returning -EINVAL to prevent out of bounds accesses.

Update ftrace self-test to ensure this occurs properly.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

CVE-2023-54139: A negative write index in Linux kernel tracing/user_events can cause out-of-bounds access.

Vulnerability

CVE-2023-54139 is a vulnerability in the Linux kernel's tracing/user_events functionality. The root cause is a missing validation of the write index passed by user processes during write() system calls. The index, which is the first 4 bytes of the write data, indicates which event the data is destined for and is used to access a per-file array. If a user passes a negative value for this index, the kernel could access memory outside the bounds of the intended array, leading to potential memory corruption or information disclosure [1].

Exploitation

An attacker with the ability to write to a user_events file descriptor can trigger this vulnerability. The attack vector involves crafting a write() call where the first 4 bytes are set the index to a negative integer. No elevated privileges are required beyond the ability to open and write to the relevant tracefs file. The exploit does not require authentication from the attacker beyond the normal file access permissions [1].

Impact

Successful exploitation allows an attacker to read or write kernel memory outside the bounds of the event array. This can lead to arbitrary code execution in kernel context, or information disclosure of sensitive kernel data. The impact is system compromise, including potential privilege escalation and denial of service [1].

Mitigation

The vulnerability is fixed in the Linux kernel by commit 0489c2b2c3104b89f078dbcec8c744dfc157d3e9. This patch adds a check to ensure the write index is not negative, returning -EINVAL if it is. The fix prevents the out-of-bounds access. Users are advised to apply the patch or update to a kernel version containing the fix. The ftrace self-test has also been updated to verify the correct behavior [1].

AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

2

Patches

4

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

4

News mentions

0

No linked articles in our index yet.