scsi: arcmsr: bound adapter-supplied completion indices and message lengths
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest4 patches 1 replyIn review
- v33 patches 3 repliesSuperseded
- v23 patches 2 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 3 patches | 3 replies | Superseded |
Changes in v4 from the cover letter
- Add patch 4, serialising the type B completion ring with doneq_lock, as raised in review of v2 3/3:
https://lore.kernel.org/all/[email protected]/
- Patches 1-3 unchanged.
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | scsi: arcmsr: bound the firmware-supplied message lengthdrivers/ | +4 | 0 replies | |
| 2/4 | scsi: arcmsr: check the completion index the adapter reportsdrivers/ | +24 | 0 replies | |
| 3/4 | scsi: arcmsr: wrap the type B completion index before using itdrivers/ | +2 | 1 reply | |
| 4/4 | scsi: arcmsr: serialise the type B completion ringdrivers/ | +11 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.
Cover letter [PATCH v4 0/4] scsi: arcmsr: bound adapter-supplied completion indices and message lengths
arcmsr uses three values from the DMA area the adapter writes - a completion slot number, a type B ring index and a message length - as subscripts or copy lengths unchecked. Patches 1-3 clamp the length, reject an unissued slot and wrap the index, each reproduced on KASAN.
Patch 4 is not about an adapter-supplied value. Type B is the only type whose completion ring is consumed with no lock: D, E and F take acb->doneq_lock on the interrupt and the polling side, and patch 4 makes B match them. arcmsr_abort() masks the outbound interrupts but never waits for a running handler, so a working adapter is enough.
Not addressed. flag_ccb is unchecked but is the CDB address the driver posted echoed back, so only a fabricating adapter leaves the pool. The data_len double fetch needs the firmware to change the field between the two reads, which patch 1 bounds anyway. Type F polling not restoring cmdSMID is also handled by the dedicated polling function in
https://lore.kernel.org/all/[email protected]/
so I am not sending it; I will rebase whichever lands second.
v4:
- Add patch 4, serialising the type B completion ring with doneq_lock, as raised in review of v2 3/3:
https://lore.kernel.org/all/[email protected]/
- Patches 1-3 unchanged.
Best regards,
Yehyeong Lee
Yehyeong Lee (4):
scsi: arcmsr: bound the firmware-supplied message length
scsi: arcmsr: check the completion index the adapter reports
scsi: arcmsr: wrap the type B completion index before using it
scsi: arcmsr: serialise the type B completion ring
drivers/scsi/arcmsr/arcmsr_hba.c | 45 +++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 4 deletions(-)
base-commit: 97d73c8251226cf27cc6656b4c542869bb8c69fa
Signature · 1 line
2.43.0