]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
scsi: sg: only check for dxfer_len greater than 256M
authorJohannes Thumshirn <jthumshirn@suse.de>
Thu, 27 Jul 2017 07:11:26 +0000 (09:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Aug 2017 02:34:28 +0000 (19:34 -0700)
commitc4b3691a2c83c696ec65bdf9bda4b28095e18331
tree4a95db81ad40c6190ca350a1ac4caf0c84aacb69
parent91b2b39b49c25a0a76e3ef5302e848e6c9e60cfd
scsi: sg: only check for dxfer_len greater than 256M

commit f930c7043663188429cd9b254e9d761edfc101ce upstream.

Don't make any assumptions on the sg_io_hdr_t::dxfer_direction or the
sg_io_hdr_t::dxferp in order to determine if it is a valid request. The
only way we can check for bad requests is by checking if the length
exceeds 256M.

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Fixes: 28676d869bbb (scsi: sg: check for valid direction before starting the
request)
Reported-by: Jason L Tibbitts III <tibbs@math.uh.edu>
Tested-by: Jason L Tibbitts III <tibbs@math.uh.edu>
Suggested-by: Doug Gilbert <dgilbert@interlog.com>
Cc: Doug Gilbert <dgilbert@interlog.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/sg.c