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]
Message-ID: <20200129113643.GB5277@kroah.com>
Date:   Wed, 29 Jan 2020 12:36:43 +0100
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Thomas Voegtle <tv@...96.de>
Cc:     linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        ronnie sahlberg <ronniesahlberg@...il.com>,
        Christoph Böhmwalder 
        <christoph.boehmwalder@...bit.com>,
        Steve French <smfrench@...il.com>,
        Philipp Reisner <philipp.reisner@...bit.com>,
        David Laight <David.Laight@...lab.com>,
        "Eric W. Biederman" <ebiederm@...ssion.com>,
        Sasha Levin <sashal@...nel.org>
Subject: Re: [PATCH 4.9 183/271] signal: Allow cifs and drbd to receive their
 terminating signals

On Wed, Jan 29, 2020 at 12:10:47PM +0100, Thomas Voegtle wrote:
> On Tue, 28 Jan 2020, Greg Kroah-Hartman wrote:
> 
> > From: Eric W. Biederman <ebiederm@...ssion.com>
> > 
> > [ Upstream commit 33da8e7c814f77310250bb54a9db36a44c5de784 ]
> > 
> > My recent to change to only use force_sig for a synchronous events
> > wound up breaking signal reception cifs and drbd.  I had overlooked
> > the fact that by default kthreads start out with all signals set to
> > SIG_IGN.  So a change I thought was safe turned out to have made it
> > impossible for those kernel thread to catch their signals.
> > 
> > Reverting the work on force_sig is a bad idea because what the code
> > was doing was very much a misuse of force_sig.  As the way force_sig
> > ultimately allowed the signal to happen was to change the signal
> > handler to SIG_DFL.  Which after the first signal will allow userspace
> > to send signals to these kernel threads.  At least for
> > wake_ack_receiver in drbd that does not appear actively wrong.
> > 
> > So correct this problem by adding allow_kernel_signal that will allow
> > signals whose siginfo reports they were sent by the kernel through,
> > but will not allow userspace generated signals, and update cifs and
> > drbd to call allow_kernel_signal in an appropriate place so that their
> > thread can receive this signal.
> > 
> > Fixing things this way ensures that userspace won't be able to send
> > signals and cause problems, that it is clear which signals the
> > threads are expecting to receive, and it guarantees that nothing
> > else in the system will be affected.
> > 
> > This change was partly inspired by similar cifs and drbd patches that
> > added allow_signal.
> > 
> > Reported-by: ronnie sahlberg <ronniesahlberg@...il.com>
> > Reported-by: Christoph Böhmwalder <christoph.boehmwalder@...bit.com>
> > Tested-by: Christoph Böhmwalder <christoph.boehmwalder@...bit.com>
> > Cc: Steve French <smfrench@...il.com>
> > Cc: Philipp Reisner <philipp.reisner@...bit.com>
> > Cc: David Laight <David.Laight@...LAB.COM>
> > Fixes: 247bc9470b1e ("cifs: fix rmmod regression in cifs.ko caused by force_sig changes")
> > Fixes: 72abe3bcf091 ("signal/cifs: Fix cifs_put_tcp_session to call send_sig instead of force_sig")
> 
> These two commits come with that release, but...
> 
> > Fixes: fee109901f39 ("signal/drbd: Use send_sig not force_sig")
> > Fixes: 3cf5d076fb4d ("signal: Remove task parameter from force_sig")
> 
> ...these two commits not and were never added to 4.9.y.
> 
> Are these both really not needed?

I don't think so, do you feel otherwise?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ