From: Vasiliy Kulikov Date: Sat, 6 Nov 2010 14:41:31 +0000 (+0300) Subject: usb: misc: iowarrior: fix information leak to userland X-Git-Tag: v2.6.34.9~134 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b2af2ddc6b97968a2ef18161ee0c0681fc0df559;p=thirdparty%2Fkernel%2Fstable.git usb: misc: iowarrior: fix information leak to userland commit eca67aaeebd6e5d22b0d991af1dd0424dc703bfb upstream. 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 Acked-by: Kees Cook Signed-off-by: Greg Kroah-Hartman Signed-off-by: Paul Gortmaker --- diff --git a/drivers/usb/misc/iowarrior.c b/drivers/usb/misc/iowarrior.c index d3c8523638832..7c8432146d18d 100644 --- a/drivers/usb/misc/iowarrior.c +++ b/drivers/usb/misc/iowarrior.c @@ -552,6 +552,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;