[Trusty][Bionic][SRU][PATCH 0/1] Fix for CVE-2018-16658

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Trusty][Bionic][SRU][PATCH 0/1] Fix for CVE-2018-16658

Po-Hsu Lin (Sam)
Small fix for type casting.
Can be cherry-picked for both Trusty and Bionic.

Scott Bauer (1):
  cdrom: Fix info leak/OOB read in cdrom_ioctl_drive_status

 drivers/cdrom/cdrom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

[CVE-2018-16658][Trusty][Bionic][SRU][PATCH 1/1] cdrom: Fix info leak/OOB read in cdrom_ioctl_drive_status

Po-Hsu Lin (Sam)
From: Scott Bauer <[hidden email]>

CVE-2018-16658

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 <[hidden email]>
Signed-off-by: Scott Bauer <[hidden email]>
Cc: [hidden email]
Signed-off-by: Jens Axboe <[hidden email]>
(cherry picked from commit 8f3fafc9c2f0ece10832c25f7ffcb07c97a32ad4)
Signed-off-by: Po-Hsu Lin <[hidden email]>
---
 drivers/cdrom/cdrom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index cbee2e7..f0534a4 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -2542,7 +2542,7 @@ static int cdrom_ioctl_drive_status(struct cdrom_device_info *cdi,
  if (!CDROM_CAN(CDC_SELECT_DISC) ||
     (arg == CDSL_CURRENT || arg == CDSL_NONE))
  return cdi->ops->drive_status(cdi, CDSL_CURRENT);
- if (((int)arg >= cdi->capacity))
+ if (arg >= cdi->capacity)
  return -EINVAL;
  return cdrom_slot_status(cdi, arg);
 }
--
2.7.4


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [CVE-2018-16658][Trusty][Bionic][SRU][PATCH 1/1] cdrom: Fix info leak/OOB read in cdrom_ioctl_drive_status

Stefan Bader-2
On 03.10.2018 08:29, Po-Hsu Lin wrote:

> From: Scott Bauer <[hidden email]>
>
> CVE-2018-16658
>
> 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 <[hidden email]>
> Signed-off-by: Scott Bauer <[hidden email]>
> Cc: [hidden email]
> Signed-off-by: Jens Axboe <[hidden email]>
> (cherry picked from commit 8f3fafc9c2f0ece10832c25f7ffcb07c97a32ad4)
> Signed-off-by: Po-Hsu Lin <[hidden email]>
Acked-by: Stefan Bader <[hidden email]>

> ---
>  drivers/cdrom/cdrom.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
> index cbee2e7..f0534a4 100644
> --- a/drivers/cdrom/cdrom.c
> +++ b/drivers/cdrom/cdrom.c
> @@ -2542,7 +2542,7 @@ static int cdrom_ioctl_drive_status(struct cdrom_device_info *cdi,
>   if (!CDROM_CAN(CDC_SELECT_DISC) ||
>      (arg == CDSL_CURRENT || arg == CDSL_NONE))
>   return cdi->ops->drive_status(cdi, CDSL_CURRENT);
> - if (((int)arg >= cdi->capacity))
> + if (arg >= cdi->capacity)
>   return -EINVAL;
>   return cdrom_slot_status(cdi, arg);
>  }
>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

ACK: [CVE-2018-16658][Trusty][Bionic][SRU][PATCH 1/1] cdrom: Fix info leak/OOB read in cdrom_ioctl_drive_status

Kleber Souza
In reply to this post by Po-Hsu Lin (Sam)
On 10/03/18 08:29, Po-Hsu Lin wrote:

> From: Scott Bauer <[hidden email]>
>
> CVE-2018-16658
>
> 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 <[hidden email]>
> Signed-off-by: Scott Bauer <[hidden email]>
> Cc: [hidden email]
> Signed-off-by: Jens Axboe <[hidden email]>
> (cherry picked from commit 8f3fafc9c2f0ece10832c25f7ffcb07c97a32ad4)
> Signed-off-by: Po-Hsu Lin <[hidden email]>

Acked-by: Kleber Sacilotto de Souza <[hidden email]>

> ---
>  drivers/cdrom/cdrom.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
> index cbee2e7..f0534a4 100644
> --- a/drivers/cdrom/cdrom.c
> +++ b/drivers/cdrom/cdrom.c
> @@ -2542,7 +2542,7 @@ static int cdrom_ioctl_drive_status(struct cdrom_device_info *cdi,
>   if (!CDROM_CAN(CDC_SELECT_DISC) ||
>      (arg == CDSL_CURRENT || arg == CDSL_NONE))
>   return cdi->ops->drive_status(cdi, CDSL_CURRENT);
> - if (((int)arg >= cdi->capacity))
> + if (arg >= cdi->capacity)
>   return -EINVAL;
>   return cdrom_slot_status(cdi, arg);
>  }
>


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED: [Trusty][Bionic][SRU][PATCH 0/1] Fix for CVE-2018-16658

Kleber Souza
In reply to this post by Po-Hsu Lin (Sam)
On 10/03/18 08:29, Po-Hsu Lin wrote:
> Small fix for type casting.
> Can be cherry-picked for both Trusty and Bionic.
>
> Scott Bauer (1):
>   cdrom: Fix info leak/OOB read in cdrom_ioctl_drive_status
>
>  drivers/cdrom/cdrom.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Applied to {trusty,bionic}/master-next branches.

Thanks,
Kleber

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team