All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] scsi: mvumi: bound two firmware-supplied lengths
@ 2026-10-13 17:31 Yehyeong Lee
  2026-10-13 17:31 ` [PATCH v2 1/2] scsi: mvumi: bound the per-event parameter and sense dumps Yehyeong Lee
  2026-10-13 17:31 ` [PATCH v2 2/2] scsi: mvumi: reject an out-of-range handshake frame length Yehyeong Lee
  0 siblings, 2 replies; 5+ messages in thread
From: Yehyeong Lee @ 2026-10-13 17:31 UTC (permalink / raw)
  To: Martin K . Petersen, James E . J . Bottomley
  Cc: linux-scsi, linux-kernel, stable, yhlee

Two places in mvumi trust length/count fields the Marvell UMI firmware
supplies and never check them against the buffers they index.  An event
with the maximum param_count/sense_data_length makes mvumi_show_event()
read past the 512-byte event buffer and into the log; a handshake page
with frame_length >= 256 makes the checksum loop, which uses an unsigned
char counter, spin forever during probe (shorter over-long values read
past the page).  Both date to the driver's introduction.

v2: read the handshake frame_length once into a local and use it for both
    the bound check and the checksum, so an untrusted device cannot change
    it between the two (addresses the double-fetch noted in review);
    1/2 unchanged.

Yehyeong Lee (2):
  scsi: mvumi: bound the per-event parameter and sense dumps
  scsi: mvumi: reject an out-of-range handshake frame length

 drivers/scsi/mvumi.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)


base-commit: 24a19b953e2a3d0ea5a8c4951a0ab8f32720c907
-- 
2.43.0


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

end of thread, other threads:[~2026-10-13 18:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-13 17:31 [PATCH v2 0/2] scsi: mvumi: bound two firmware-supplied lengths Yehyeong Lee
2026-10-13 17:31 ` [PATCH v2 1/2] scsi: mvumi: bound the per-event parameter and sense dumps Yehyeong Lee
2026-10-13 17:31 ` [PATCH v2 2/2] scsi: mvumi: reject an out-of-range handshake frame length Yehyeong Lee
2026-10-13 17:50   ` sashiko-bot
2026-10-13 18:13     ` Yehyeong Lee

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.