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]
Date:   Mon, 09 Dec 2019 09:40:37 +0800
From:   Zhang Rui <rui.zhang@...el.com>
To:     Ben Hutchings <ben@...adent.org.uk>,
        Ido Schimmel <idosch@...lanox.com>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>,
        "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
        Denis Kirjanov <kda@...ux-powerpc.org>,
        Jiri Pirko <jiri@...lanox.com>,
        "wvw@...gle.com" <wvw@...gle.com>
Subject: Re: [PATCH 3.16 43/72] thermal: Fix use-after-free when
 unregistering thermal zone device

On Sun, 2019-12-08 at 18:09 +0000, Ben Hutchings wrote:
> On Sun, 2019-12-08 at 16:22 +0000, Ido Schimmel wrote:
> > On Sun, Dec 08, 2019 at 01:53:27PM +0000, Ben Hutchings wrote:
> > > 3.16.79-rc1 review patch.  If anyone has any objections, please
> > > let me know.
> > > 
> > > ------------------
> > > 
> > > From: Ido Schimmel <idosch@...lanox.com>
> > > 
> > > commit 1851799e1d2978f68eea5d9dff322e121dcf59c1 upstream.
> > > 
> > > thermal_zone_device_unregister() cancels the delayed work that
> > > polls the
> > > thermal zone, but it does not wait for it to finish. This is racy
> > > with
> > > respect to the freeing of the thermal zone device, which can
> > > result in a
> > > use-after-free [1].
> > > 
> > > Fix this by waiting for the delayed work to finish before freeing
> > > the
> > > thermal zone device. Note that thermal_zone_device_set_polling()
> > > is
> > > never invoked from an atomic context, so it is safe to call
> > > cancel_delayed_work_sync() that can block.
> > 
> > Ben,
> > 
> > Wei Wang (copied) found a problem with this patch and fixed it:
> > 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=163b00cde7cf2206e248789d2780121ad5e6a70b
> > 
> > I believe you should take both patches to your tree.
> 
> Thanks, I will add that now that it is in Linus's tree.
> 

yes, please do, thanks!

-rui
> Ben.
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ