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: firefly_0821_release~9833^2~79^2^2~88 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=737b96b8f3def0a8d10ee792cb12ba8d0f7a2317;p=firefly-linux-kernel-4.4.55.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 --- diff --git a/drivers/usb/misc/iowarrior.c b/drivers/usb/misc/iowarrior.c index bc88c79875a1..0db05b252e3b 100644 --- a/drivers/usb/misc/iowarrior.c +++ b/drivers/usb/misc/iowarrior.c @@ -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;