]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cdrom: Fix info leak/OOB read in cdrom_ioctl_drive_status
authorScott Bauer <scott.bauer@intel.com>
Thu, 26 Apr 2018 17:51:08 +0000 (11:51 -0600)
committerBrian Maly <brian.maly@oracle.com>
Wed, 26 Sep 2018 00:23:02 +0000 (20:23 -0400)
commit9a792a4a2a75b138af4b79d1f0502d7a2a2e25b7
treef16345f9515511fa0a1742e04b4c02da92e4a1a8
parenta5a22cfa614228b14037ff77f76778a89fea8abf
cdrom: Fix info leak/OOB read in cdrom_ioctl_drive_status

Like d88b6d04: "cdrom: information leak in cdrom_ioctl_media_changed()"

There is another cast from unsigned long to int which causes
a bounds check to fail with specially crafted input. The value is
then used as an index in the slot array in cdrom_slot_status().

Signed-off-by: Scott Bauer <scott.bauer@intel.com>
Signed-off-by: Scott Bauer <sbauer@plzdonthack.me>
Cc: stable@vger.kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
(cherry picked from commit 8f3fafc9c2f0ece10832c25f7ffcb07c97a32ad4)

Orabug: 28664501
CVE: CVE-2018-16658

Reviewed-by: Jack Vogel <jack.vogel@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/cdrom/cdrom.c