VYPR
Unrated severityNVD Advisory· Published Oct 28, 2025· Updated Apr 15, 2026

CVE-2025-40060

CVE-2025-40060

Description

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

coresight: trbe: Return NULL pointer for allocation failures

When the TRBE driver fails to allocate a buffer, it currently returns the error code "-ENOMEM". However, the caller etm_setup_aux() only checks for a NULL pointer, so it misses the error. As a result, the driver continues and eventually causes a kernel panic.

Fix this by returning a NULL pointer from arm_trbe_alloc_buffer() on allocation failures. This allows that the callers can properly handle the failure.

AI Insight

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

Linux kernel TRBE driver returns -ENOMEM instead of NULL on allocation failure, causing kernel panic; fix returns NULL.

Vulnerability

In the Linux kernel's CoreSight Trace Buffer Extension (TRBE) driver, the function arm_trbe_alloc_buffer() returns an error code (-ENOMEM) when a buffer allocation fails. However, the caller etm_setup_aux() only checks for a NULL pointer to detect failures. This mismatch means the caller does not recognize the failure and continues execution, leading to a kernel panic.

Exploitation

An attacker with local access and the ability to trigger TRBE buffer allocations (e.g., via the perf subsystem) could force the system into a low-memory state that causes an allocation failure. By doing so, they can induce a kernel panic, resulting in a denial of service (DoS). No special privileges beyond local user access are required if the perf events subsystem is accessible.

Impact

A successful exploitation causes a kernel panic, immediately crashing the system and denying service to legitimate users. This is a high-severity issue with a CVSS v3.1 base score of 5.5 (medium), as it requires local access but no authentication.

Mitigation

The fix has been backported to stable kernel branches as commits [1], [2], and [3]. Users should update their kernels to versions including these commits. No workarounds are available; the only solution is applying the patch.

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

1

Patches

6

Vulnerability mechanics

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

References

6

News mentions

0

No linked articles in our index yet.