Commit 8889676
scsi: sd: Fix VPD page 0xb7 length check
sd_read_block_limits_ext() currently assumes that vpd->len excludes the
size of the page header. However, vpd->len describes the size of the entire
VPD page, therefore the sanity check is incorrect.
In practice this is not really a problem since we don't attach VPD
pages unless they actually report data trailing the header. But fix
the length check regardless.
This issue was identified by Wukong-Agent (formerly Tencent Woodpecker), a
code security AI agent, through static code analysis.
[mkp: rewrote patch description]
Signed-off-by: jackysliu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Fixes: 96b171d ("scsi: core: Query the Block Limits Extension VPD page")
Signed-off-by: Martin K. Petersen <[email protected]>1 parent 00f452a commit 8889676
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3384 | 3384 | | |
3385 | 3385 | | |
3386 | 3386 | | |
3387 | | - | |
| 3387 | + | |
3388 | 3388 | | |
3389 | 3389 | | |
3390 | 3390 | | |
| |||
0 commit comments