mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kees Cook <kees.cook@canonical.com>
To: Vasiliy Kulikov <segooon@gmail.com>
Cc: kernel-janitors@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@suse.de>,
	Arnd Bergmann <arnd@arndb.de>, Oliver Neukum <oliver@neukum.org>,
	Joe Perches <joe@perches.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: misc: iowarrior: fix information leak to userland
Date: Sat, 6 Nov 2010 10:51:55 -0700	[thread overview]
Message-ID: <20101106175155.GB5327@outflux.net> (raw)
In-Reply-To: <1289054492-18278-1-git-send-email-segooon@gmail.com>

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

      reply	other threads:[~2010-11-06 17:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-06 14:41 Vasiliy Kulikov
2010-11-06 17:51 ` Kees Cook [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101106175155.GB5327@outflux.net \
    --to=kees.cook@canonical.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@suse.de \
    --cc=joe@perches.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=oliver@neukum.org \
    --cc=segooon@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®