]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/commit
scsi: sg: check length passed to SG_NEXT_CMD_LEN
authorpeter chang <dpf@google.com>
Wed, 15 Feb 2017 22:11:54 +0000 (14:11 -0800)
committermobile promotions <svcmobile_promotions@nvidia.com>
Mon, 27 Nov 2017 14:50:17 +0000 (06:50 -0800)
commit5f5a0f4c723a70bbe09b62d308891ba242c4c1c5
tree13644badf58fbc337851e4dab26ad582e39142c7
parent66848b538df2ab06e0a89d1359afca3575bf22aa
scsi: sg: check length passed to SG_NEXT_CMD_LEN

The user can control the size of the next command passed along, but the
value passed to the ioctl isn't checked against the usable max command
size.

Bug 1990368

Change-Id: Icf497f3d09d5a1aa05d46391469d7704d906738e
Cc: <stable@vger.kernel.org>
Signed-off-by: Peter Chang <dpf@google.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-on: https://git-master.nvidia.com/r/1605270
GVS: Gerrit_Virtual_Submit
Reviewed-by: Hayden Du <haydend@nvidia.com>
Tested-by: Hayden Du <haydend@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
drivers/scsi/sg.c