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
1Patches
6cef047e0a55cf505a165f1c78a55c161f7f9fe53a726d5ed9768536f8260296da7849463Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
6- git.kernel.org/stable/c/296da78494633e1ab5e2e74173a9c8683b04aa6bnvd
- git.kernel.org/stable/c/8a55c161f7f9c1aa1c70611b39830d51c83ef36dnvd
- git.kernel.org/stable/c/9768536f82600a05ce901e31ccfabd92c027ff71nvd
- git.kernel.org/stable/c/cef047e0a55cb07906fcaae99170f19a9c0bb6c2nvd
- git.kernel.org/stable/c/f505a165f1c7cd37b4cb6952042a5984693a4067nvd
- git.kernel.org/stable/c/fe53a726d5edf864e80b490780cc135fc1adece9nvd
News mentions
0No linked articles in our index yet.