lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACT4Y+b0CoZY7S+OYjYBdJv6z1tTVqrE+awxUhiC5=bShpgxdg@mail.gmail.com>
Date:   Thu, 23 Mar 2017 16:22:19 +0100
From:   Dmitry Vyukov <dvyukov@...gle.com>
To:     Alan Stern <stern@...land.harvard.edu>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        mathias.nyman@...ux.intel.com, baoyou.xie@...aro.org,
        peter.chen@....com, wulf@...k-chips.com,
        wsa-dev@...g-engineering.com, javier@....samsung.com,
        chris.bainbridge@...il.com, USB list <linux-usb@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        syzkaller <syzkaller@...glegroups.com>
Subject: Re: usb: use-after-free write in usb_hcd_link_urb_to_ep

On Thu, Mar 23, 2017 at 4:04 PM, Alan Stern <stern@...land.harvard.edu> wrote:
> On Thu, 23 Mar 2017, Dmitry Vyukov wrote:
>
>> > Putting these together:
>> >
>> >         The memory was allocated in usb_internal_control_msg() line 93.
>> >         The later events occurred within the call in line 100 to
>> >         usb_start_wait_urb().
>> >
>> >         The invalid access occurred within usb_start_wait_urb() line 56.
>> >
>> >         The memory was deallocated within usb_start_wait_urb() line 78.
>> >
>> > Since these routines don't involve any loops or backward jumps, this
>> > says that the invalid access occurred before the memory was
>> > deallocated!  So why is it reported as a problem?
>>
>>
>> My first guess would be that pid 3348 did 2 calls to open and the urb
>> was somehow referenced across these calls. Is it possible?
>
> I don't think so.  The URB gets allocated and deallocated separately
> for each call.  You can see this very plainly by reading the source
> code for usb_internal_control_msg() and usb_start_wait_urb().
>
> It's possible that the same memory location was allocated and
> deallocated for two different calls at different times.  That wouldn't
> fool syzkaller, would it?


Generally it does not fool KASAN because of heap memory quarantine.
I will take a closer look tomorrow.
Thanks for looking into this.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ