usb: misc: sisusbvga: fix information leak to userland
authorVasiliy Kulikov <segooon@gmail.com>
Sat, 6 Nov 2010 14:41:35 +0000 (17:41 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 11 Nov 2010 15:14:06 +0000 (07:14 -0800)
Structure sisusb_info is copied to userland with "sisusb_reserved" field
uninitialized.  It leads to leaking of contents of kernel stack memory.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/misc/sisusbvga/sisusb.c

index 70d00e9..dd573ab 100644 (file)
@@ -3008,6 +3008,7 @@ sisusb_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 #else
                        x.sisusb_conactive  = 0;
 #endif
+                       memset(x.sisusb_reserved, 0, sizeof(x.sisusb_reserved));
 
                        if (copy_to_user((void __user *)arg, &x, sizeof(x)))
                                retval = -EFAULT;