Received: by 10.213.65.68 with SMTP id h4csp138931imn; Tue, 3 Apr 2018 17:19:38 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+woLoRlS1VUtXkzohkTDC8fN96ev2efWXMqyNxeE8pmSi8S2V5fxaldflQKnZdVUeCXEoh X-Received: by 10.99.126.73 with SMTP id o9mr508203pgn.168.1522801178470; Tue, 03 Apr 2018 17:19:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522801178; cv=none; d=google.com; s=arc-20160816; b=hCNMLv2rnKfab0NILudk+KIIWNJwomBPG6ScOP4gyh7XZezBTJpi2wpKF3vMLriiJs NQPsS96HARpaVFhxT9BYTllJ7oWc0inzjA4CK5wQ5q6+hMbTf0/gc2HZ9zANxQYf8QEs +YoXZjrgLYzOJsrXQkyvs7m1LbGLx/skE4da3Zn4JcBtZBqwlN+DumYL9W6Ca9Ta15CR w0H9v1AyjhsvfRs3InnmSpwclai7svbWia9snKpecAwaEpJ2MTQsodYMk6Tp3pAbzlRm rqejFi6O+xVHv5ImrzSGO1mXOspvrsiImSAoy+q9je8KtJ6FdUzEHsG16fu82RORGxhu VlXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=SoGKxjftZm8vqxCBw+d24HVvr30dvC6nn377Tdhp78M=; b=rucBUlSg6GMAPU4sBvIMWJbUeSVAnaB3DHUlCa2x76Rgao+M77FoRTux5+IW7a6uoc 2BXnHnyD7WlmCgE4cc5drml2m9DvOPRXoFJOempc0Gk55wwhzaH1N80xvFss6F7FkhzA 6ZXU59YDKtphqYG58U5/OKGveiutcDGvizAg793RgBU2gmGy6nOqX34ce0cSH2RVQDtG MDvTFhd+57VifI6dAqwv72BtgUSs+D79xbI6Z2VKlXfP0ocfgeF1GTg7w8l0X0C0FZAU iKpQhD1Z4mhXdfg/DaR+snGpcu1mbHEraKmoiwAnPSQOBmbMoaexkgvVj77SZPrjApif 9vmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=FYz+HXP5; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x3-v6si1730055plo.479.2018.04.03.17.19.24; Tue, 03 Apr 2018 17:19:38 -0700 (PDT) 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=@google.com header.s=20161025 header.b=FYz+HXP5; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756658AbeDDASU (ORCPT + 99 others); Tue, 3 Apr 2018 20:18:20 -0400 Received: from mail-ot0-f193.google.com ([74.125.82.193]:43114 "EHLO mail-ot0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756161AbeDDASR (ORCPT ); Tue, 3 Apr 2018 20:18:17 -0400 Received: by mail-ot0-f193.google.com with SMTP id m22-v6so21419396otf.10 for ; Tue, 03 Apr 2018 17:18:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=SoGKxjftZm8vqxCBw+d24HVvr30dvC6nn377Tdhp78M=; b=FYz+HXP5BhZjaIB4rzfTE9zT1BeuJtsPERW59BeVHYIrDfHi1djZMsQuwZVILA8lQ9 shUaIFrL5E+Zt4QgUcS+IdukwSc319uNDamUYeF3D+wbgLixghESo63i7U7Eg8GRCZzT El71hpPLQUgMqT2Xey7gXQiUkDPgNPn59gQRpU6aFqZlaFTO31CNv/TQhl7FMf1tfxry b8WXeKaQcmwwfZmaUd2aL6SlxxOaZQRdo9rMxFLywN1mv3mR0kdaKL7PXyn1fEazP3eA rRuY3I8VsUNsfvdtT/p3TAv2rOccwlELWbVGndseuFfdybbSD1/bRm6qFnPTZKazHano seJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=SoGKxjftZm8vqxCBw+d24HVvr30dvC6nn377Tdhp78M=; b=OfEmwxbhmKhyV19H7A9lfL9qVyIrY+cgq8KQXArKDdeciBbmEhImQO9SiCzx050vwZ eb9i5cPfVvrDUgncFtwUySZ6TKoeREUPHAdfCb6SgXRYT5kJJ8fpExL6CRsfE6WpOj2A 7g53b82HH8Ftjj8XeBb3UW4BnwDGBaEbhcQ1Jgx0bSVNFOgZd0DiF49aPF5a81LMUWcj lt2j8QIsvxXoqR6N43Ap8RazP/yH7Bgy3uAGmFcGn6l5+S58wbCBp+eR+BhJgC37RI+M +/ul4ER2zU6vBUPya2qf6ApC7tXGaPq6pHYOdwEuFLuk7yEWQ3AxbPhZq+eabswwMiiK Vmfg== X-Gm-Message-State: ALQs6tBaw45kq9DKljyfvcg9IZNIuDibVEryaNWp5Uy2LKunwRMGIVs9 8ZYagpVkdFRLAJ/jZrJOaBG4KfV7S7CqXpk7BRdYCQ== X-Received: by 2002:a9d:1dc3:: with SMTP id w3-v6mr9957436otw.216.1522801096335; Tue, 03 Apr 2018 17:18:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.73.133 with HTTP; Tue, 3 Apr 2018 17:17:55 -0700 (PDT) In-Reply-To: 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> From: Jann Horn Date: Wed, 4 Apr 2018 02:17:55 +0200 Message-ID: Subject: Re: [GIT PULL] Kernel lockdown for secure boot To: Linus Torvalds Cc: Matthew Garrett , Andrew Lutomirski , David Howells , Ard Biesheuvel , James Morris , Alan Cox , Greg Kroah-Hartman , Linux Kernel Mailing List , Justin Forbes , linux-man , joeyli , LSM List , Linux API , Kees Cook , linux-efi Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 4, 2018 at 2:06 AM, Linus Torvalds wrote: > On Tue, Apr 3, 2018 at 4:59 PM, Matthew Garrett wrote: >> >> Ok. So we can build distribution kernels that *always* have this on, and to >> turn it off you have to disable Secure Boot and install a different kernel. > > Bingo. > > Exactly like EVERY OTHER KERNEL CONFIG OPTION. > > Just like all the ones that I've mentioned several times. > > Or, like a lot of other kernel options, maybe have a way to just > disable it on the kernel command line, and let the user know about it. > > That would still be better than disabling secure boot entirely in your > world view, so it's (a) more convenient and (b) better. > > Again, in no case does it make sense to tie it into "how did we boot". > Because that's just inconvenient for everybody. Without taking a stance regarding whether I think that kernel lockdown makes sense, I think Matthew's point is this: If you don't have lockdown, secure boot doesn't provide a benefit, since an attacker could just modify the init binary instead of messing with your kernel. If you have secure boot, you want lockdown to prevent chainloading into a backdoored version of the real OS.