From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756032AbbFOUB3 (ORCPT ); Mon, 15 Jun 2015 16:01:29 -0400 Received: from imap.thunk.org ([74.207.234.97]:36703 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754559AbbFOUBV (ORCPT ); Mon, 15 Jun 2015 16:01:21 -0400 Date: Mon, 15 Jun 2015 16:01:15 -0400 From: "Theodore Ts'o" To: Josh Boyer Cc: Eric Biederman , David Howells , kexec , "Linux-Kernel@Vger. Kernel. Org" Subject: Re: kexec_load(2) bypasses signature verification Message-ID: <20150615200115.GG5003@thunk.org> Mail-Followup-To: Theodore Ts'o , Josh Boyer , Eric Biederman , David Howells , kexec , "Linux-Kernel@Vger. Kernel. Org" References: <20150615035051.GA2634@thunk.org> <20150615131728.GK15793@thunk.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 15, 2015 at 09:37:05AM -0400, Josh Boyer wrote: > The bits that actually read Secure Boot state out of the UEFI > variables, and apply protections to the machine to avoid compromise > under the SB threat model. Things like disabling the old kexec... I don't have any real interest in using Secure Boot, but I *am* interested in using CONFIG_KEXEC_VERIFY_SIG[1]. So perhaps we need to have something similar to what we have with signed modules in terms of CONFIG_MODULE_SIG_FORCE and module/sig_enforce, but for KEXEC_VERIFY_SIG. This would mean creating a separate flag independent of the one Linus suggested for Secure Boot, but since we have one for signed modules, we do have precedent for this sort of thing. - Ted [1] Yes, it doesn't buy all that much, since if the system is rooted the adversary can just replace the kernel in /boot and force a normal, slower reboot, but the same could be said for signed modules --- the adversary could just replace all of /boot/vmlinux- and /lib/modules/. But both measures make it a tad more bit difficult, especially for the adversary to do this replacement without being noticed (for example linode will send me e-mail if the system reboots normally, but not with a kexec-mediated reboot), and for cloud systems where we don't have secure boot anyway, it's about the best we can do. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from imap.thunk.org ([2600:3c02::f03c:91ff:fe96:be03]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z4aZg-00086c-Bh for kexec@lists.infradead.org; Mon, 15 Jun 2015 20:01:41 +0000 Date: Mon, 15 Jun 2015 16:01:15 -0400 From: Theodore Ts'o Subject: Re: kexec_load(2) bypasses signature verification Message-ID: <20150615200115.GG5003@thunk.org> References: <20150615035051.GA2634@thunk.org> <20150615131728.GK15793@thunk.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: Josh Boyer Cc: David Howells , kexec , Eric Biederman , "Linux-Kernel@Vger. Kernel. Org" On Mon, Jun 15, 2015 at 09:37:05AM -0400, Josh Boyer wrote: > The bits that actually read Secure Boot state out of the UEFI > variables, and apply protections to the machine to avoid compromise > under the SB threat model. Things like disabling the old kexec... I don't have any real interest in using Secure Boot, but I *am* interested in using CONFIG_KEXEC_VERIFY_SIG[1]. So perhaps we need to have something similar to what we have with signed modules in terms of CONFIG_MODULE_SIG_FORCE and module/sig_enforce, but for KEXEC_VERIFY_SIG. This would mean creating a separate flag independent of the one Linus suggested for Secure Boot, but since we have one for signed modules, we do have precedent for this sort of thing. - Ted [1] Yes, it doesn't buy all that much, since if the system is rooted the adversary can just replace the kernel in /boot and force a normal, slower reboot, but the same could be said for signed modules --- the adversary could just replace all of /boot/vmlinux- and /lib/modules/. But both measures make it a tad more bit difficult, especially for the adversary to do this replacement without being noticed (for example linode will send me e-mail if the system reboots normally, but not with a kexec-mediated reboot), and for cloud systems where we don't have secure boot anyway, it's about the best we can do. _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec