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  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:   Fri, 8 Feb 2019 09:06:56 -0800
From:   Tejun Heo <tj@...nel.org>
To:     Sven Van Asbroeck <thesven73@...il.com>
Cc:     Lai Jiangshan <jiangshanlai@...il.com>,
        linux-kernel@...r.kernel.org, Sebastian Reichel <sre@...nel.org>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Kees Cook <keescook@...omium.org>
Subject: Re: [RFC v1 1/3] workqueue: Add resource-managed version of
 INIT_[DELAYED_]WORK()

On Mon, Feb 04, 2019 at 05:09:50PM -0500, Sven Van Asbroeck wrote:
> In modules which extensively use devm_ resource management, it is often
> easy to overlook (delayed) work that is left pending or running after the
> module is unloaded. This could introduce user-after-free issues.
> 
> Nudge kernel developers into 'doing the right thing' by introducing a
> resource-managed version of INIT_[DELAYED_]WORK(). This can be used as
> an elegant way to ensure that work is not left pending or running after
> its dependencies are released.
> 
> Functions introduced in workqueue.h :
> - devm_init_work()
> - devm_init_delayed_work()

I don't object to the basic idea but cancel_[delayed_]work_sync()
works iff queueing is disabled already, so there can be situations
where this can lead to surprising / subtle failures.  Given that, it
*might* not be a bad idea to keep this explicit unless there is a way
to reliably block future queueing.

Thanks.

-- 
tejun

Powered by blists - more mailing lists