diff options
| author | Young_X <YangX92@hotmail.com> | 2018-10-03 12:54:29 +0000 |
|---|---|---|
| committer | Ben Hutchings <ben@decadent.org.uk> | 2018-12-16 22:09:46 +0000 |
| commit | 4d0f2564603d1ef8cce8a083751442342e9c9474 (patch) | |
| tree | 8a350f052271d1b309c13101adc83dabe09f3b09 | |
| parent | 789a4317666e599e487ec1983643de1b519c431e (diff) | |
cdrom: fix improper type cast, which can leat to information leak.
commit e4f3aa2e1e67bb48dfbaaf1cad59013d5a5bc276 upstream.
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().
This issue is similar to CVE-2018-16658 and CVE-2018-10940.
Signed-off-by: Young_X <YangX92@hotmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
| -rw-r--r-- | drivers/cdrom/cdrom.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index c61de6df44b0..6fd7e418924a 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c @@ -2427,7 +2427,7 @@ static int cdrom_ioctl_select_disc(struct cdrom_device_info *cdi, return -ENOSYS; if (arg != CDSL_CURRENT && arg != CDSL_NONE) { - if ((int)arg >= cdi->capacity) + if (arg >= cdi->capacity) return -EINVAL; } |
