提交 eca67aae 编写于 作者: V Vasiliy Kulikov 提交者: Greg Kroah-Hartman

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: NVasiliy Kulikov <segooon@gmail.com>
Cc: stable <stable@kernel.org>
Acked-by: NKees Cook <kees.cook@canonical.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 5dc92cf1
...@@ -553,6 +553,7 @@ static long iowarrior_ioctl(struct file *file, unsigned int cmd, ...@@ -553,6 +553,7 @@ static long iowarrior_ioctl(struct file *file, unsigned int cmd,
/* needed for power consumption */ /* needed for power consumption */
struct usb_config_descriptor *cfg_descriptor = &dev->udev->actconfig->desc; struct usb_config_descriptor *cfg_descriptor = &dev->udev->actconfig->desc;
memset(&info, 0, sizeof(info));
/* directly from the descriptor */ /* directly from the descriptor */
info.vendor = le16_to_cpu(dev->udev->descriptor.idVendor); info.vendor = le16_to_cpu(dev->udev->descriptor.idVendor);
info.product = dev->product_id; info.product = dev->product_id;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册