]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: sd: Protect against READ(6) or WRITE(6) with zero block transfer length
authorBart Van Assche <bvanassche@acm.org>
Wed, 23 Jan 2019 19:12:37 +0000 (11:12 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 29 Jan 2019 05:49:23 +0000 (00:49 -0500)
commit4ec65ba9cbdb3b919f74caf48948e31a44a76d99
treee9f7a50d213e0ff5022aa8080fea26c144290341
parenta40b180ed8741c899d6aad9f9485092dfcdb1933
scsi: sd: Protect against READ(6) or WRITE(6) with zero block transfer length

Since the READ(6) and WRITE(6) commands interpret a zero in the transfer
length field in the CDB as 256 logical blocks, avoid submitting such
commands.

Cc: Douglas Gilbert <dgilbert@interlog.com>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Christoph Hellwig <hch@lst.de>
Reported-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Douglas Gilbert <dgilbert@interlog.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/sd.c