Skip to content

hw/scsi/megasas: Avoid buffer overrun in megasas_handle_scsi()

Philippe Mathieu-Daudé qemu-devel 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 8 repliesIn review
  2. v13 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- Fix assert() condition
- Extract reproducer in different patch for git-bisect (thuth)
- Add simpler reproducer from Alex
- Try better scsi error

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4tests/qtest/fuzz-test: Quit test_lp1878642 once donetests/qtest/fuzz-test.c+1 -01 reply
2/4hw/scsi/megasas: Assert cdb_len is valid in megasas_handle_scsi()hw/scsi/megasas.c+5 -05 replies
3/4tests/qtest/fuzz-test: Add test_megasas_cdb_len_zero() reproducertests/qtest/fuzz-test.c+19 -02 replies
4/4hw/scsi/megasas: Have incorrect cdb return MFI_STAT_ABORT_NOT_POSSIBLEhw/scsi/megasas.c+9 -10 replies

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by.

PatchThomas HuthDaniele BuonoAlexander BulekovLi Qiang
1/4R-b R-b
2/4Inspired-by Inspired-by
3/4A-b
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/4] hw/scsi/megasas: Avoid buffer overrun in megasas_handle_scsi()

FWIW megasas is not use by KVM.

Not sure what is the proper fix, but at least we
have a reproducer.

Since v1:
- Fix assert() condition
- Extract reproducer in different patch for git-bisect (thuth)
- Add simpler reproducer from Alex
- Try better scsi error

Philippe Mathieu-Daudé (4):
tests/qtest/fuzz-test: Quit test_lp1878642 once done hw/scsi/megasas: Assert cdb_len is valid in megasas_handle_scsi() tests/qtest/fuzz-test: Add test_megasas_cdb_len_zero() reproducer hw/scsi/megasas: Have incorrect cdb return MFI_STAT_ABORT_NOT_POSSIBLE

 hw/scsi/megasas.c       | 13 +++++++++++++
 tests/qtest/fuzz-test.c | 20 ++++++++++++++++++++
 2 files changed, 33 insertions(+)
Signature · 1 line
2.26.2