diff options
| author | Magdalena Schulfer <magdalena.schulfer@intel.com> | 2026-09-01 14:57:48 +0200 |
|---|---|---|
| committer | Karol Wachowski <karol.wachowski@linux.intel.com> | 2026-09-07 08:08:35 +0200 |
| commit | 0724afc55c77c36c7feb9a7264b02aa7593c5c2d (patch) | |
| tree | c9e57031dcdfd63e52c3baa3b76c1578de49805f /scripts/Makefile.thinlto | |
| parent | 3837c3f29fbc3b8c12bebf5c62741e2befe3482a (diff) | |
| download | linux-0724afc55c77c36c7feb9a7264b02aa7593c5c2d.tar.gz linux-0724afc55c77c36c7feb9a7264b02aa7593c5c2d.zip | |
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.
Cc: stable@vger.kernel.org
Fixes: d4e4257afa6e ("accel/ivpu: Add firmware tracing support")
Signed-off-by: Magdalena Schulfer <magdalena.schulfer@intel.com>
Signed-off-by: Dawid Osuchowski <dawid.osuchowski@linux.intel.com>
Reviewed-by: Karol Wachowski <karol.wachowski@linux.intel.com>
Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com>
Link: https://patch.msgid.link/20260901125749.404338-3-dawid.osuchowski@linux.intel.com
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
