signal: Always deliver the kernel's SIGKILL and SIGSTOP to a pid namespace init
authorEric W. Biederman <ebiederm@xmission.com>
Mon, 3 Sep 2018 18:02:46 +0000 (20:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2018 19:15:00 +0000 (11:15 -0800)
commit06bd97b79584764d3ff4dbd42d4ca87d2cbe5a46
treeeb37a797376b6b2b3c46655dbf9c0a293e7b87b7
parent5ae1c65ae960cdc0b2b9a5a614d54f7cfa33e31a
signal: Always deliver the kernel's SIGKILL and SIGSTOP to a pid namespace init

[ Upstream commit 3597dfe01d12f570bc739da67f857fd222a3ea66 ]

Instead of playing whack-a-mole and changing SEND_SIG_PRIV to
SEND_SIG_FORCED throughout the kernel to ensure a pid namespace init
gets signals sent by the kernel, stop allowing a pid namespace init to
ignore SIGKILL or SIGSTOP sent by the kernel.  A pid namespace init is
only supposed to be able to ignore signals sent from itself and
children with SIG_DFL.

Fixes: 921cf9f63089 ("signals: protect cinit from unblocked SIG_DFL signals")
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/signal.c