]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: sg: fixup infoleak when using SG_GET_REQUEST_TABLE
authorHannes Reinecke <hare@suse.de>
Fri, 15 Sep 2017 12:05:16 +0000 (14:05 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 15 Sep 2017 19:16:49 +0000 (15:16 -0400)
commit06c3ddecedb221c8aa4ea1afa4a71d38ff580c01
tree6832509ca4b548ac72e54b000c58b00847dbb835
parent0ffe0aa0d811482ed2b47149023b15798542f150
scsi: sg: fixup infoleak when using SG_GET_REQUEST_TABLE

When calling SG_GET_REQUEST_TABLE ioctl only a half-filled table is
returned; the remaining part will then contain stale kernel memory
information.  This patch zeroes out the entire table to avoid this
issue.

Signed-off-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/sg.c