]> www.infradead.org Git - users/jedix/linux-maple.git/commit
scsi: sg: allocate with __GFP_ZERO in sg_build_indirect()
authorAlexander Potapenko <glider@google.com>
Fri, 18 May 2018 14:23:18 +0000 (16:23 +0200)
committerBrian Maly <brian.maly@oracle.com>
Tue, 20 Nov 2018 19:05:18 +0000 (14:05 -0500)
commit1f453d6998ac2c3d5d007ced75821dbdc9e5a982
treea2367c2cb67476051fe5f795f8781307d0d4ed45
parent7c2093cdf2e2782be98c01514e1d7cf20c254a8e
scsi: sg: allocate with __GFP_ZERO in sg_build_indirect()

This shall help avoid copying uninitialized memory to the userspace when
calling ioctl(fd, SG_IO) with an empty command.

Reported-by: syzbot+7d26fc1eea198488deab@syzkaller.appspotmail.com
Cc: stable@vger.kernel.org
Signed-off-by: Alexander Potapenko <glider@google.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit a45b599ad808c3c982fdcdc12b0b8611c2f92824)

Orabug: 28892656
CVE: CVE-2018-1000204

Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/scsi/sg.c