accel/ivpu: Validate firmware log buffer metadata
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
accel/ivpu: Validate firmware log buffer metadata
The tracing log headers parsed by fw_log_print_buffer() reside in DMA-shared BOs that the NPU firmware can write to.
fw_log_from_bo() validated log->header_size and log->size, but fw_log_print_buffer() re-read those same fields from shared memory afterwards, allowing a TOCTOU where firmware changes them between the check and the use, and making the host dereference out-of-bounds addresses while printing logs.
Snapshot the validated values once with READ_ONCE() and pass them down explicitly in a new struct ivpu_fw_log_desc instead of re-reading them from the shared struct.
From the CVE record · Linux
The Linux kernel's accel/ivpu driver re-reads firmware log metadata from DMA-shared memory after validating it. If NPU firmware changes that metadata between the check and use, the host can dereference out-of-bounds addresses while printing logs. The input does not specify whether an attacker can control the firmware or what access would be required.
Engineers running Linux kernels with the accel/ivpu driver should check their vendor's advisory; affected versions were not specified.