dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] accel/ivpu: Harden parsing of firmware-shared buffers
@ 2026-09-01 12:57 Dawid Osuchowski
  2026-09-01 12:57 ` [PATCH v2 1/3] accel/ivpu: Validate full buffer range in ivpu_to_cpu_addr Dawid Osuchowski
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Dawid Osuchowski @ 2026-09-01 12:57 UTC (permalink / raw)
  To: dri-devel
  Cc: oded.gabbay, jeff.hugo, karol.wachowski, lizhi.hou,
	andrzej.kacprowski, dawid.osuchowski

The IPC and firmware tracing buffers live in memory shared with the NPU
firmware, so every field the host reads from them is untrusted input.
This series fixes places where the host trusted such input and could
end up dereferencing addresses outside the underlying BO.

All patches are tagged for stable.

Changes since v1:
 - Added a new patch ("accel/ivpu: Limit firmware log name prints to
   field size") after Sashiko pointed out that log->name was still being
   printed with an unbounded "%s" conversion. The field is fixed-size
   and expected to be NUL-terminated, but a firmware bug could drop the
   terminator; harden the host against that case.
 - No changes to the other two patches.

Dawid Osuchowski (1):
  accel/ivpu: Limit firmware log name prints to field size

Magdalena Schulfer (2):
  accel/ivpu: Validate full buffer range in ivpu_to_cpu_addr
  accel/ivpu: Validate firmware log buffer metadata

 drivers/accel/ivpu/ivpu_fw_log.c | 87 +++++++++++++++++++-------------
 drivers/accel/ivpu/ivpu_gem.h    | 14 +++--
 drivers/accel/ivpu/ivpu_ipc.c    |  7 +--
 3 files changed, 67 insertions(+), 41 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-09-02 12:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-01 12:57 [PATCH v2 0/3] accel/ivpu: Harden parsing of firmware-shared buffers Dawid Osuchowski
2026-09-01 12:57 ` [PATCH v2 1/3] accel/ivpu: Validate full buffer range in ivpu_to_cpu_addr Dawid Osuchowski
2026-09-02 12:56   ` Wachowski, Karol
2026-09-01 12:57 ` [PATCH v2 2/3] accel/ivpu: Validate firmware log buffer metadata Dawid Osuchowski
2026-09-02 12:57   ` Wachowski, Karol
2026-09-01 12:57 ` [PATCH v2 3/3] accel/ivpu: Limit firmware log name prints to field size Dawid Osuchowski
2026-09-01 13:19   ` sashiko-bot
2026-09-02 12:58   ` Wachowski, Karol

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox