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: <nycvar.YFH.7.76.1801111737190.11852@cbobk.fhfr.pm>
Date:   Thu, 11 Jan 2018 17:37:37 +0100 (CET)
From:   Jiri Kosina <jikos@...nel.org>
To:     Miroslav Benes <mbenes@...e.cz>
cc:     jpoimboe@...hat.com, jeyu@...nel.org, pmladek@...e.com,
        jbaron@...mai.com, live-patching@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] livepatch: add locking to force and signal
 functions

On Thu, 21 Dec 2017, Miroslav Benes wrote:

> klp_send_signals() and klp_force_transition() do not acquire klp_mutex,
> because it seemed to be superfluous. A potential race in
> klp_send_signals() was harmless and there was nothing in
> klp_force_transition() which needed to be synchronized. That changed
> with the addition of klp_forced variable during the review process.
> 
> There is a small window now, when klp_complete_transition() does not see
> klp_forced set to true while all tasks have been already transitioned to
> the target state. module_put() is called and the module can be removed.
> 
> Acquire klp_mutex in sysfs callback to prevent it. Do the same for the
> signal sending just to be sure. There is no real downside to that.
> 
> Reported-by: Jason Baron <jbaron@...mai.com>
> Signed-off-by: Miroslav Benes <mbenes@...e.cz>

I've added two Fixes: tags and applied to for-4.16/signal-sysfs-force-v2.

Thanks,

-- 
Jiri Kosina
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ