Message ID | 20211115165343.996963128@linuxfoundation.org |
---|---|
State | Superseded |
Headers | show |
Series | None | expand |
On 11/15/21 8:55 AM, Greg Kroah-Hartman wrote: > From: Tadeusz Struk <tadeusz.struk@linaro.org> > > commit 703535e6ae1e94c89a9c1396b4c7b6b41160ef0c upstream. Hi Greg, Thanks for having queued this patch for the 5.10 stable branch. Do you plan to also include commit 20aaef52eb08 ("scsi: scsi_ioctl: Validate command size")? That patch prevents that the bug in the commit mentioned above can be triggered. Thanks, Bart.
On Mon, Nov 15, 2021 at 09:58:19AM -0800, Bart Van Assche wrote: > On 11/15/21 8:55 AM, Greg Kroah-Hartman wrote: > > From: Tadeusz Struk <tadeusz.struk@linaro.org> > > > > commit 703535e6ae1e94c89a9c1396b4c7b6b41160ef0c upstream. > > Hi Greg, > > Thanks for having queued this patch for the 5.10 stable branch. > > Do you plan to also include commit 20aaef52eb08 ("scsi: scsi_ioctl: Validate > command size")? That patch prevents that the bug in the commit mentioned > above can be triggered. It did not apply to 5.10.y and 5.14.y and a "FAILED:" email was sent out asking for a backport of it. If you can provide that, great, I'll be glad to take it. thanks, greg k-h
--- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1193,8 +1193,6 @@ static blk_status_t scsi_setup_scsi_cmnd } cmd->cmd_len = scsi_req(req)->cmd_len; - if (cmd->cmd_len == 0) - cmd->cmd_len = scsi_command_size(cmd->cmnd); cmd->cmnd = scsi_req(req)->cmd; cmd->transfersize = blk_rq_bytes(req); cmd->allowed = scsi_req(req)->retries;