Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3479921imu; Sun, 11 Nov 2018 16:03:45 -0800 (PST) X-Google-Smtp-Source: AJdET5dLuCscq1ret2rpZ/+IueONTNWQqN8qynxjNof9j8f4dS9sjr/DUiyp0brYdG1/A3PgDvsd X-Received: by 2002:a63:1a4b:: with SMTP id a11mr15673762pgm.254.1541981025274; Sun, 11 Nov 2018 16:03:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541981025; cv=none; d=google.com; s=arc-20160816; b=YtOza01+Agkhno1EDl3saO/3yetgjlVwLJ1XXoE+JmnbfB62lTdzV9tpa5odM0r8zO FfGgBu4QK7UfqiPBMJyIjf8tw+l9JAsqVC6GLF7oqbkK1hbOpbx7qM/fIu1L+rDNC2Or TUbZ+7a7NjUF9TMI7qK2Z/qX7kVlIcCt2I3r5YBcwtmyyjtcM5uR3yvMVmGxNOYOsmE6 /ZrdtZ78i7oeyhC6XH0oEQS4+NJDjWeLrLVBfr9pZYpi/4I800LOFwdecK9hZnNBC9LS 06ajO3nZl1+ZQ083VSpzPloZuUVSR+uMhuK2PHw7sADyCEwl7719aPBh9XBS2l7r2U0X jIsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ZdXJpQCP1Df2IckPjStY2Ec5Ne6rLoJPHQZKbQ+Jh60=; b=ghJdDit7wogxYk4/ppDSpSZW6uEIKyh2CrmOilt6raxGhXtub1fdW0PDNDe0luVubr mMZCnVKTp2bLSzb2U/Mmf0pqTNbtg95Vspv1B6S4HVzJVWQqSKpId4DTFkC7rXbu1Nti OnZkPkjz/Ar9zKFQooCWREMUwscU+Xc15dlimgIUe3MUbuSjjGD17/oEUvHHLle/j81b +zReo12SSBV4bnwvET9lVctxxEUmKThPYWLz3UzHKeWrrf4lLNboL7bMpQW2lopfK0z5 xMWqY9p3S1P2Dt0f/w4cjkgzQkzt4BmUX2Y16hkdkCRNkPs+Fb0da53Y35y/VqriyohQ F+TQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=U4W3IQzg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u11-v6si14689606pgh.55.2018.11.11.16.03.30; Sun, 11 Nov 2018 16:03:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=U4W3IQzg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732139AbeKLIRw (ORCPT + 99 others); Mon, 12 Nov 2018 03:17:52 -0500 Received: from mail.kernel.org ([198.145.29.99]:34452 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732118AbeKLIRv (ORCPT ); Mon, 12 Nov 2018 03:17:51 -0500 Received: from localhost (unknown [206.108.79.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 99BDA223CB; Sun, 11 Nov 2018 22:27:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975275; bh=IUsf6lA51QmkWma12+mxQv1CfQ1ucATupAFc6CKouIc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U4W3IQzg+YzhRAC7Zk4RWRM6RxKu9apyvz4lOIa718RPsXu/uKYe1Upop3VEynoqT 2rp5Zl2r4W1F1G7snBn3/dYh9YBQlYQiyOFOEeVuFOX4EMoYhDS4EgUtQ4NIewlt4/ AP012uyAySvJkK966smnHTldZlnLwB7ZGKfcXiv4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Gleixner , "Eric W. Biederman" , Sasha Levin Subject: [PATCH 4.19 185/361] signal: Always deliver the kernels SIGKILL and SIGSTOP to a pid namespace init Date: Sun, 11 Nov 2018 14:18:52 -0800 Message-Id: <20181111221646.272431889@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: "Eric W. Biederman" [ 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 Signed-off-by: "Eric W. Biederman" Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- kernel/signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/kernel/signal.c +++ b/kernel/signal.c @@ -1035,7 +1035,7 @@ static int __send_signal(int sig, struct result = TRACE_SIGNAL_IGNORED; if (!prepare_signal(sig, t, - from_ancestor_ns || (info == SEND_SIG_FORCED))) + from_ancestor_ns || (info == SEND_SIG_PRIV) || (info == SEND_SIG_FORCED))) goto ret; pending = (type != PIDTYPE_PID) ? &t->signal->shared_pending : &t->pending;