coresight: trbe: Return NULL pointer for allocation failures
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 3fbf7f011f2426dac8c982f1d2ef469a7959a524 · < 8a55c161f7f9c1aa1c70611b39830d51c83ef36d| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel’s CoreSight TRBE driver can return an error code when a buffer allocation fails, but its caller checks only for a NULL pointer. The missed error can lead to a kernel panic. The input does not specify how an attacker could trigger the failure or whether access or user interaction is required.
Engineers running Linux kernels with the CoreSight TRBE driver should check their kernel; affected versions are not specified.