usb: misc: iowarrior: fix information leak to userland
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>
This commit is contained in:
parent
5dc92cf1d0
commit
eca67aaeeb
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue