CVE-2025-40060 coresight: trbe: Return NULL pointer for allocation failures
A missing NULL check in the Linux kernel TRBE driver causes a kernel panic on allocation failure, leading to local denial of service.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-40060?
CVE-2025-40060 is a vulnerability in Linux, published on 28 Oct 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Official 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.
Which versions are affected by CVE-2025-40060?
How do I fix CVE-2025-40060?
Apply the vendor's patch.
Is CVE-2025-40060 being exploited?
There is no known exploitation of CVE-2025-40060 in the wild and no public exploit code.
Sources
Also known as BELL-CVE-2025-40060, DEBIAN-CVE-2025-40060, GHSA-8w6p-wg52-cjgx, ROOT-OS-DEBIAN-12-CVE-2025-40060, ROOT-OS-DEBIAN-13-CVE-2025-40060, ROOT-OS-UBUNTU-2204-CVE-2025-40060 and 2 more.