lkml.org 
[lkml]   [2023]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] workqueue: Fix UAF report by KASAN in pwq_release_workfn()
>
> On Wed, Sep 06, 2023 at 10:12:34AM +0800, Z qiang wrote:
> > Flush the pwq_release_worker is insufficient, the call_rcu() is
> > invoked to release wq
> > in pwq_release_workfn(), this is also asynchronous.
>
> But rcu_free_pwq() doesn't access wq or anything. The last access is from
> the work function.

The rcu_free_wq() will access wq->cpu_pwq or unbound_attrs,
but at this time, the kfree(wq) may have been called in alloc_workqueue().

Thanks
Zqiang


>
> Thanks.
>
> --
> tejun

\
 
 \ /
  Last update: 2023-09-07 04:14    [W:0.162 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site