diff options
author | Martin K. Petersen <[email protected]> | 2024-05-20 22:30:40 -0400 |
---|---|---|
committer | Martin K. Petersen <[email protected]> | 2024-05-23 20:35:32 -0400 |
commit | d09c05aa35909adb7d29f92f0cd79fdcd1338ef0 (patch) | |
tree | 2d3b6c4830241858f2416b69d7de340b30623b17 /scripts/generate_rust_analyzer.py | |
parent | e4f5f8298cf6ddae43210d236ad65ac2c6379559 (diff) |
scsi: core: Handle devices which return an unusually large VPD page count
Peter Schneider reported that a system would no longer boot after
updating to 6.8.4. Peter bisected the issue and identified commit
b5fc07a5fb56 ("scsi: core: Consult supported VPD page list prior to
fetching page") as being the culprit.
Turns out the enclosure device in Peter's system reports a byteswapped
page length for VPD page 0. It reports "02 00" as page length instead
of "00 02". This causes us to attempt to access 516 bytes (page length
+ header) of information despite only 2 pages being present.
Limit the page search scope to the size of our VPD buffer to guard
against devices returning a larger page count than requested.
Link: https://lore.kernel.org/r/[email protected]
Fixes: b5fc07a5fb56 ("scsi: core: Consult supported VPD page list prior to fetching page")
Cc: [email protected]
Reported-by: Peter Schneider <[email protected]>
Closes: https://lore.kernel.org/all/[email protected]/
Tested-by: Peter Schneider <[email protected]>
Reviewed-by: Bart Van Assche <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions