scsi: ufs: Fix descriptor parsing and invalid input handling
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest6 patches 14 repliesIn review
- v15 patches 7 repliesSuperseded
Changes in v2 from the cover letter
- Reworked patch 2 as requested: drop changes to the safe scsi_cmd_priv(NULL) and scsi_cmd_to_rq(NULL) calls and retain only the invalid-CQE diagnostic fix.
- Split the previous RPMB patch into a request-length validation patch and an independent unaligned-access patch.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | scsi: ufs: core: Validate string descriptorsdrivers/ | +19 | 2 replies | |
| 2/6 | scsi: ufs: Avoid NULL CQE dereference when reporting invalid tagsdrivers/ | +2 | 2 replies | |
| 3/6 | scsi: ufs: core: Validate connected lane countsdrivers/ | +3 | 0 replies | |
| 4/6 | scsi: ufs: rpmb: Validate request frame length before parsingdrivers/ | +4 | 2 replies | |
| 5/6 | scsi: ufs: rpmb: Use unaligned accessors for RPMB framesdrivers/ | +2 | 4 replies | |
| 6/6 | scsi: ufs: debugfs: Reserve space for a string terminatordrivers/ | +1 | 2 replies |
Reviews trailers per patch
5 of 6 patches have a Reviewed-by or Acked-by.
| Patch | Peter Wang | Bean Huo | Bart Van Assche |
|---|---|---|---|
| 1/6 | R-b | R-b | |
| 2/6 | R-b | R-b | |
| 3/6 | |||
| 4/6 | R-b | R-b | |
| 5/6 | R-b | ||
| 6/6 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v2 0/6] scsi: ufs: Fix descriptor parsing and invalid input handling
The first patch validates string descriptor payload sizes and avoids raw descriptor overreads. The remaining patches protect invalid completion diagnostics, validate connected lane counts, validate RPMB frame sizes, use unaligned RPMB frame accesses, and retain a NUL terminator for debugfs input.
Changes in v2:
- Reworked patch 2 as requested: drop changes to the safe scsi_cmd_priv(NULL) and scsi_cmd_to_rq(NULL) calls and retain only the invalid-CQE diagnostic fix.
- Split the previous RPMB patch into a request-length validation patch and an independent unaligned-access patch.
Li Qiang (6):
scsi: ufs: core: Validate string descriptors
scsi: ufs: Avoid NULL CQE dereference when reporting invalid tags
scsi: ufs: core: Validate connected lane counts
scsi: ufs: rpmb: Validate request frame length before parsing
scsi: ufs: rpmb: Use unaligned accessors for RPMB frames
scsi: ufs: debugfs: Reserve space for a string terminator
drivers/ufs/core/ufs-debugfs.c | 2 +- drivers/ufs/core/ufs-rpmb.c | 8 ++++++-- drivers/ufs/core/ufshcd.c | 32 ++++++++++++++++++++++++-------- 3 files changed, 31 insertions(+), 11 deletions(-)
Signature · 1 line
2.43.0