lkml.org 
[lkml]   [2011]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[34-longterm 076/209] usb: misc: iowarrior: fix information leak to userland
    Date
    From: Vasiliy Kulikov <segooon@gmail.com>

    =====================================================================
    | This is a commit scheduled for the next v2.6.34 longterm release. |
    | If you see a problem with using this for longterm, please comment.|
    =====================================================================

    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 <segooon@gmail.com>
    Acked-by: Kees Cook <kees.cook@canonical.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
    Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
    ---
    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 d3c8523..7c84321 100644
    --- a/drivers/usb/misc/iowarrior.c
    +++ b/drivers/usb/misc/iowarrior.c
    @@ -552,6 +552,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.4.4


    \
     
     \ /
      Last update: 2011-04-14 20:03    [W:4.249 / U:0.964 seconds]
    ©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site