Skip to content
Snippets Groups Projects
Commit f3e198c6 authored by steven_syu's avatar steven_syu Committed by Carol_Jiang
Browse files

robin: security: patch for CVE-2016-4482

Subject: [PATCH] USB: usbfs: fix potential infoleak in devio

The stack object "ci" has a total size of 8 bytes. Its last 3 bytes
are padding bytes which are not initialized and leaked to userland
via "copy_to_user".

Change-Id: I0e72b4f00bf253d472bfce2660e5370de99d0018
Reviewed-on: http://mcrd1-22-pc.corpnet.asus/code-review/master/249847


Reviewed-by: default avatarSteven Syu <steven_syu@asus.com>
Tested-by: default avatarSteven Syu <steven_syu@asus.com>
Reviewed-by: default avatarCarol_Jiang <carol_jiang@asus.com>
parent eb5b2036
Branches
Tags android-wear-6.0.1_r0.61
No related merge requests found
...@@ -1105,10 +1105,11 @@ static int proc_getdriver(struct dev_state *ps, void __user *arg) ...@@ -1105,10 +1105,11 @@ static int proc_getdriver(struct dev_state *ps, void __user *arg)
static int proc_connectinfo(struct dev_state *ps, void __user *arg) static int proc_connectinfo(struct dev_state *ps, void __user *arg)
{ {
struct usbdevfs_connectinfo ci = { struct usbdevfs_connectinfo ci;
.devnum = ps->dev->devnum,
.slow = ps->dev->speed == USB_SPEED_LOW memset(&ci, 0, sizeof(ci));
}; ci.devnum = ps->dev->devnum;
ci.slow = ps->dev->speed == USB_SPEED_LOW;
if (copy_to_user(arg, &ci, sizeof(ci))) if (copy_to_user(arg, &ci, sizeof(ci)))
return -EFAULT; return -EFAULT;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment