]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
usb: misc: iowarrior: fix information leak to userland
authorVasiliy Kulikov <segooon@gmail.com>
Sat, 6 Nov 2010 14:41:31 +0000 (17:41 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 11 Nov 2010 15:14:07 +0000 (07:14 -0800)
Structure iowarrior_info is copied to userland with padding byted
between "serial" and "revision" fields uninitialized.  It leads to
leaking of contents of kernel stack memory.

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Cc: stable <stable@kernel.org>
Acked-by: Kees Cook <kees.cook@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/misc/iowarrior.c

index 3756641987762f3ff196bcb16601610a164a883a..c9078e4e1f4d5a5cd384a181d024fbccb83fc1e7 100644 (file)
@@ -553,6 +553,7 @@ static long iowarrior_ioctl(struct file *file, unsigned int cmd,
                        /* needed for power consumption */
                        struct usb_config_descriptor *cfg_descriptor = &dev->udev->actconfig->desc;
 
+                       memset(&info, 0, sizeof(info));
                        /* directly from the descriptor */
                        info.vendor = le16_to_cpu(dev->udev->descriptor.idVendor);
                        info.product = dev->product_id;