mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] usb: misc: iowarrior: fix information leak to userland
@ 2010-11-06 14:41 Vasiliy Kulikov
  2010-11-06 17:51 ` Kees Cook
  0 siblings, 1 reply; 2+ messages in thread
From: Vasiliy Kulikov @ 2010-11-06 14:41 UTC (permalink / raw)
  To: kernel-janitors
  Cc: Greg Kroah-Hartman, Arnd Bergmann, Oliver Neukum, Kees Cook,
	Joe Perches, linux-usb, linux-kernel

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>
---
 Compile tested.

 drivers/usb/misc/iowarrior.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/misc/iowarrior.c b/drivers/usb/misc/iowarrior.c
index 3756641..c9078e4 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;
-- 
1.7.0.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] usb: misc: iowarrior: fix information leak to userland
  2010-11-06 14:41 [PATCH] usb: misc: iowarrior: fix information leak to userland Vasiliy Kulikov
@ 2010-11-06 17:51 ` Kees Cook
  0 siblings, 0 replies; 2+ messages in thread
From: Kees Cook @ 2010-11-06 17:51 UTC (permalink / raw)
  To: Vasiliy Kulikov
  Cc: kernel-janitors, Greg Kroah-Hartman, Arnd Bergmann,
	Oliver Neukum, Joe Perches, linux-usb, linux-kernel

On Sat, Nov 06, 2010 at 05:41:31PM +0300, Vasiliy Kulikov wrote:
> 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>

Acked-by: Kees Cook <kees.cook@canonical.com>

> ---
>  Compile tested.
> 
>  drivers/usb/misc/iowarrior.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/usb/misc/iowarrior.c b/drivers/usb/misc/iowarrior.c
> index 3756641..c9078e4 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;
> -- 
> 1.7.0.4
-- 
Kees Cook
Ubuntu Security Team

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-11-06 17:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-06 14:41 [PATCH] usb: misc: iowarrior: fix information leak to userland Vasiliy Kulikov
2010-11-06 17:51 ` Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome