From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Cyrus-Session-Id: sloti22d1t05-470151-1522859270-2-10385362908019429973 X-Sieve: CMU Sieve 3.0 X-Spam-known-sender: no ("Email failed DMARC policy for domain") X-Spam-score: 0.0 X-Spam-hits: BAYES_00 -1.9, HEADER_FROM_DIFFERENT_DOMAINS 0.249, RCVD_IN_DNSWL_HI -5, T_RP_MATCHES_RCVD -0.01, LANGUAGES en, BAYES_USED global, SA_VERSION 3.4.0 X-Spam-source: IP='209.132.180.67', Host='vger.kernel.org', Country='US', FromHeader='com', MailFrom='org' X-Spam-charsets: plain='UTF-8' X-IgnoreVacation: yes ("Email failed DMARC policy for domain") X-Resolved-to: greg@kroah.com X-Delivered-to: greg@kroah.com X-Mail-from: linux-api-owner@vger.kernel.org ARC-Seal: i=1; a=rsa-sha256; cv=none; d=messagingengine.com; s=fm2; t= 1522859270; b=BcuFLoZTPLHwIHSk+26hQUgO1TmAgT4j/VVL/CwIlplN7ZD4JV S7ng5gdsyo58kTdttvCnVDqETSIE01T4uUHsJfaSpPWfV/80KjK6kkxlpegjjKDs 34FFrZ/IJuDAMIKRzBED34NYC7/cLxkk9rpWPP4d5VVSaXg0BTyZP/HJ1nOVLZ8Q R+YUrQjX8v7QmqvqCLYwUhBgtj002pwVRZOEb8jj9mDHvaqg1YOvC/tF0R9J9V1j YIwazQN8JfV0sRFaN7b5kt2j4K2tnsZdGV1hW74X+WZApchtOj5vNad+sZA3Bg9L kvtUY/8n+sQaGMk4zyb1i1nj/ww33etptYAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=mime-version:references:in-reply-to:from :date:message-id:subject:to:cc:content-type:sender:list-id; s= fm2; t=1522859270; bh=3T+RCnWjmaSSlNxtS+jEJaGo8nawrucWvKmfvJHMqI M=; b=IQeERCHBgtca2ONi0rlZyoCjdrUAovCWRZvhJLJvJycHvp17CzPJSWiIKU lNn5aeI0lDYZNO7o2Mzdo4Rk8OckdWJtWjBQIzAQiB7nCXH2YB3MjCq3Gzee70dp IqrihuS7NqJiSayO0cRIVhcqM+oL8+/S6G4Gihi94mGG0Qn7t+yhPEAwsWnVRBTe TSVH6iKBdH6qULwK6kihwvp0ci67sr8bkU8i9d+XQ9SRYU+VXURYvTFpO1i0Rs4H hfKZ8jJlnHzKqXDyJwfW+mVWLoM+2AEZSCzQgJ+8IgbgXkkhp5o015JJD8RBKESU iB2k4wG9k5cSxh05F0favHgQbYBA== ARC-Authentication-Results: i=1; mx6.messagingengine.com; arc=none (no signatures found); dkim=fail (body has been altered, 2048-bit rsa key sha256) header.d=google.com header.i=@google.com header.b=CmDcEIMz x-bits=2048 x-keytype=rsa x-algorithm=sha256 x-selector=20161025; dmarc=fail (p=reject,has-list-id=yes,d=reject) header.from=google.com; iprev=pass policy.iprev=209.132.180.67 (vger.kernel.org); spf=none smtp.mailfrom=linux-api-owner@vger.kernel.org smtp.helo=vger.kernel.org; x-aligned-from=fail; x-cm=none score=0; x-google-dkim=fail (body has been altered, 2048-bit rsa key) header.d=1e100.net header.i=@1e100.net header.b=BbUWxEFY; x-ptr=pass x-ptr-helo=vger.kernel.org x-ptr-lookup=vger.kernel.org; x-return-mx=pass smtp.domain=vger.kernel.org smtp.result=pass smtp_org.domain=kernel.org smtp_org.result=pass smtp_is_org_domain=no header.domain=google.com header.result=pass header_is_org_domain=yes; x-vs=clean score=-100 state=0 Authentication-Results: mx6.messagingengine.com; arc=none (no signatures found); dkim=fail (body has been altered, 2048-bit rsa key sha256) header.d=google.com header.i=@google.com header.b=CmDcEIMz x-bits=2048 x-keytype=rsa x-algorithm=sha256 x-selector=20161025; dmarc=fail (p=reject,has-list-id=yes,d=reject) header.from=google.com; iprev=pass policy.iprev=209.132.180.67 (vger.kernel.org); spf=none smtp.mailfrom=linux-api-owner@vger.kernel.org smtp.helo=vger.kernel.org; x-aligned-from=fail; x-cm=none score=0; x-google-dkim=fail (body has been altered, 2048-bit rsa key) header.d=1e100.net header.i=@1e100.net header.b=BbUWxEFY; x-ptr=pass x-ptr-helo=vger.kernel.org x-ptr-lookup=vger.kernel.org; x-return-mx=pass smtp.domain=vger.kernel.org smtp.result=pass smtp_org.domain=kernel.org smtp_org.result=pass smtp_is_org_domain=no header.domain=google.com header.result=pass header_is_org_domain=yes; x-vs=clean score=-100 state=0 X-ME-VSCategory: clean X-CM-Envelope: MS4wfG1UwJoTwRTzTtQmshLEif6ZicByij9CZ0zLiuCY+mPU4PGeVPVW7WhiqGqMDEVjjgN/vjRl0ZTXWyNQl6gDRh9VOYsXrpdmnA45b2EV0E2+4iTsb9dB yT4wUKaQ24Nhh2RfJdBe5qe3k6ZlHTPscpYO/lD8kXbduBO2Wqq7aq5NdU6pQ/1tCvuU5fn2FBtyYJMHoGKQHv5L9U5kSE8wqQrJoaa0CCGydCuaYR54qMtL X-CM-Analysis: v=2.3 cv=FKU1Odgs c=1 sm=1 tr=0 a=UK1r566ZdBxH71SXbqIOeA==:117 a=UK1r566ZdBxH71SXbqIOeA==:17 a=IkcTkHD0fZMA:10 a=Kd1tUaAdevIA:10 a=pGLkceISAAAA:8 a=1XWaLZrsAAAA:8 a=Hnm2Hy9fAAAA:8 a=VwQbUJbxAAAA:8 a=GWAosDmGulpdkMD96qgA:9 a=QEXdDO2ut3YA:10 a=179r5xe0yFUA:10 a=x8gzFH9gYPwA:10 a=5NXnnWeYSB0A:10 a=qByqzKpv1oajCkFmDuv_:22 a=AjGcO6oz07-iQ99wixmX:22 X-ME-CMScore: 0 X-ME-CMCategory: none Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752014AbeDDQ05 (ORCPT ); Wed, 4 Apr 2018 12:26:57 -0400 Received: from mail-io0-f195.google.com ([209.85.223.195]:44323 "EHLO mail-io0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751772AbeDDQ0z (ORCPT ); Wed, 4 Apr 2018 12:26:55 -0400 X-Google-Smtp-Source: AIpwx4/WnmWQwub2h+r+iLHsc4ncR3q9mdsXoLnZRhjNkxJSbfWgP0fyXgil5mUyrhcSsOqGklRgGELEsdClVtS1d0w= MIME-Version: 1.0 References: <4136.1522452584@warthog.procyon.org.uk> <186aeb7e-1225-4bb8-3ff5-863a1cde86de@kernel.org> <30459.1522739219@warthog.procyon.org.uk> <9758.1522775763@warthog.procyon.org.uk> <13189.1522784944@warthog.procyon.org.uk> <9349.1522794769@warthog.procyon.org.uk> In-Reply-To: From: Matthew Garrett Date: Wed, 04 Apr 2018 16:26:43 +0000 Message-ID: Subject: Re: [GIT PULL] Kernel lockdown for secure boot To: oiaohm@gmail.com Cc: Linus Torvalds , luto@kernel.org, David Howells , Ard Biesheuvel , jmorris@namei.org, Alan Cox , Greg Kroah-Hartman , Linux Kernel Mailing List , jforbes@redhat.com, linux-man@vger.kernel.org, jlee@suse.com, LSM List , linux-api@vger.kernel.org, Kees Cook , linux-efi Content-Type: text/plain; charset="UTF-8" Sender: linux-api-owner@vger.kernel.org X-Mailing-List: linux-api@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-Mailing-List: linux-kernel@vger.kernel.org List-ID: On Tue, Apr 3, 2018 at 11:56 PM Peter Dolding wrote: > On Wed, Apr 4, 2018 at 11:13 AM, Matthew Garrett wrote: > > There are four cases: > > > > Verified Boot off, lockdown off: Status quo in distro and mainline kernels > > Verified Boot off, lockdown on: Perception of security improvement that's > > trivially circumvented (and so bad) > > Verified Boot on, lockdown off: Perception of security improvement that's > > trivially circumvented (and so bad), status quo in mainline kernels > > Verified Boot on, lockdown on: Security improvement, status quo in distro > > kernels > > > > Of these four options, only two make sense. The most common implementation > > of Verified Boot on x86 platforms is UEFI Secure Boot, > Stop right there. Verified boot does not have to be UEFI secureboot. > You could be using a uboot verified boot or > https://www.coreboot.org/git-docs/Intel/vboot.html google vboot. > Neither of these provide flags to kernel to say they have been > performed. They can be modified to set the appropriate bit in the bootparams - the reason we can't do that in the UEFI case is that Linux can be built as a UEFI binary that the firmware execute directly, and so the firmware has no way to set that flag. > Now Verified Boot on, lockdown off. Insanely this can be required in > diagnostic on some embedded platform because EFI secureboot does not > have a off switch. These are platforms where they don't boot if > they don't have a PK and KEK set installed. Yes some of these is jtag > the PK and KEK set in. > The fact that this Verified Boot on, lockdown off causes trouble > points to a clear problem. User owns the hardware they should have > the right to defeat secureboot if they wish to. Which is why Shim allows you to disable validation if you prove physical user presence.