]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Sep 2017 08:57:20 +0000 (10:57 +0200)
commit9793679d8dc92d1d8a187d023d2d7a17dd9348b5
tree9f5fa54978941d3613578b6037f8f7860523036f
parent691e12db75fb7f55bbbf8c1fea7d462eb1a5e38a
scsi: sg: fixup infoleak when using SG_GET_REQUEST_TABLE

commit 3e0097499839e0fe3af380410eababe5a47c4cf9 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/sg.c