Skip to content
Commit f7068114 authored by Jens Axboe's avatar Jens Axboe
Browse files

sr: pass down correctly sized SCSI sense buffer



We're casting the CDROM layer request_sense to the SCSI sense
buffer, but the former is 64 bytes and the latter is 96 bytes.
As we generally allocate these on the stack, we end up blowing
up the stack.

Fix this by wrapping the scsi_execute() call with a properly
sized sense buffer, and copying back the bits for the CDROM
layer.

Cc: stable@vger.kernel.org
Reported-by: default avatarPiotr Gabriel Kosinski <pg.kosinski@gmail.com>
Reported-by: default avatarDaniel Shapira <daniel@twistlock.com>
Tested-by: default avatarKees Cook <keescook@chromium.org>
Fixes: 82ed4db4

 ("block: split scsi_request out of struct request")
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 1c1a2ee1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment