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] [day] [month] [year] [list]
Message-Id: <20140327.145948.29790647563036147.davem@davemloft.net>
Date:	Thu, 27 Mar 2014 14:59:48 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	oliver@...kum.org
Cc:	netdev@...r.kernel.org, oneukum@...e.de
Subject: Re: [PATCH] usbnet: include wait queue head in device structure

From: oliver@...kum.org
Date: Wed, 26 Mar 2014 14:32:51 +0100

> From: Oliver Neukum <oneukum@...e.de>
> 
> This fixes a race which happens by freeing an object on the stack.
> Quoting Julius:
>> The issue is
>> that it calls usbnet_terminate_urbs() before that, which temporarily
>> installs a waitqueue in dev->wait in order to be able to wait on the
>> tasklet to run and finish up some queues. The waiting itself looks
>> okay, but the access to 'dev->wait' is totally unprotected and can
>> race arbitrarily. I think in this case usbnet_bh() managed to succeed
>> it's dev->wait check just before usbnet_terminate_urbs() sets it back
>> to NULL. The latter then finishes and the waitqueue_t structure on its
>> stack gets overwritten by other functions halfway through the
>> wake_up() call in usbnet_bh().
> 
> The fix is to just not allocate the data structure on the stack.
> As dev->wait is abused as a flag it also takes a runtime PM change
> to fix this bug.
> 
> Signed-off-by: Oliver Neukum <oneukum@...e.de>
> Reported-by: Grant Grundler <grundler@...gle.com>
> Tested-by: Grant Grundler <grundler@...gle.com>

Applied and queued up for -stable, thanks Oliver.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ