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]
Date:   Wed, 20 Sep 2023 13:00:35 +0800
From:   Z qiang <qiang.zhang1211@...il.com>
To:     Tejun Heo <tj@...nel.org>
Cc:     jiangshanlai@...il.com, syzkaller-bugs@...glegroups.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] workqueue: Fix UAF report by KASAN in pwq_release_workfn()

>
> On Tue, Sep 19, 2023 at 07:42:39AM -1000, Tejun Heo wrote:
> > Hello,
> >
> > The patch looks fine but
> >
> > On Tue, Sep 19, 2023 at 04:19:58PM +0800, Zqiang wrote:
> > > @@ -4743,6 +4743,8 @@ struct workqueue_struct *alloc_workqueue(const char *fmt,
> > >     wq_free_lockdep(wq);
> > >  err_free_wq:
> > >     free_workqueue_attrs(wq->unbound_attrs);
> >
> > Can you please add a comment here explaining why the flushing is necessary?
> >
> > > +   if (wq->flags & WQ_UNBOUND)
> > > +           kthread_flush_worker(pwq_release_worker);
>
> Hmm... also, wouldn't it be clearer to flush from alloc_and_link_pwqs()
> right after apply_workqueue_attrs() failed? That's the only case that
> requires flushing, right?
>

Yes, thanks,  I will resend :)

Thanks
Zqiang

>
> Thanks.
>
> --
> tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ