summaryrefslogtreecommitdiff
path: root/tools/lib/api/debug.c
diff options
context:
space:
mode:
authorMartin K. Petersen <martin.petersen@oracle.com>2024-05-20 22:30:40 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-06-16 13:51:05 +0200
commitdf769f0c977e226944c5597b8133218289e95553 (patch)
tree9143669cc36e6f8173024ac62b4bb49e875a2ce3 /tools/lib/api/debug.c
parent7c72eb192fc11fa0d29675fbb25edfc6778348f1 (diff)
scsi: core: Handle devices which return an unusually large VPD page count
commit d09c05aa35909adb7d29f92f0cd79fdcd1338ef0 upstream. 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/20240521023040.2703884-1-martin.petersen@oracle.com Fixes: b5fc07a5fb56 ("scsi: core: Consult supported VPD page list prior to fetching page") Cc: stable@vger.kernel.org Reported-by: Peter Schneider <pschneider1968@googlemail.com> Closes: https://lore.kernel.org/all/eec6ebbf-061b-4a7b-96dc-ea748aa4d035@googlemail.com/ Tested-by: Peter Schneider <pschneider1968@googlemail.com> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/lib/api/debug.c')
0 files changed, 0 insertions, 0 deletions