Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp118392imb; Thu, 28 Feb 2019 18:01:55 -0800 (PST) X-Google-Smtp-Source: APXvYqw/3amDmI7+KSBi1T4m7Be4bXo12pXEkV+fdlKU0X8QaNwPf4ydKTuhjvQmf7v4mEGJbKsM X-Received: by 2002:a17:902:3283:: with SMTP id z3mr2808857plb.76.1551405714980; Thu, 28 Feb 2019 18:01:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551405714; cv=none; d=google.com; s=arc-20160816; b=vU9Km9PpqzKvfCria8ySdd9mer7KiPRy5GfZtYT9T4nv551tShfLg44bvhkflhroQl Gpm8DRNENQRKDyYMqOJupxLQ6DuwbnjcRlwvDlgKdu+Bo7VCSbPzauhbYcVzeE8iJV3j qscsHBtkUmg8/s5/vV+BhX1cCKt5yIQoQbKwlNURFZbhulGkbzpwkQYZoCFA23DHdmND f8AEndxnTY50r3GK15cMe8L221WSxLQsQ66XW3koalyN2NBm0ZnPvGYx3qV4ykOFKVwh vFWM9l7Wy0kQmvCVR3RxrnRpMTVADxckINNRUd6aDUZHVCwoYGhKgyFj/XxYtlhXRU/q HSxQ== 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 :in-reply-to:references:mime-version:dkim-signature; bh=kyWA6LJVhEFVYx4LUEOQTLJtowrXpkRK5QjNOqo2Emg=; b=INKS7k4S4yqj5BuhWJf9Wptf9m1cfb2NIDUIjyPbovvKobwoPxo+0sOUqySyIpgn0a YPTu6MwYf6CcHP5O7qbn0Cv2tWbjtUMxOtP4mOPupdkJZrIPygUEBbG039NKXo6Jj/nz 2fpI/uvF3m95nhu6dihJ1dICuwN0BWrT6s88KBxucqjYUGnX+Bkh3BqsT/DDSjmOCjzN eUUrbgnia/F+faQPJdYmSU93FSsVq+b4R2+WcxV/AB9Z5/MG6PnWx4RikYm4Kcd3Y8eZ HNGeu9dBzRLmHkNO3hzQc1njXN7d1BxSS2phee2W1W8tVP9Yn57mVCZPNFRJlBG8wmBb QYgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=C9yRUYRY; 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 v4si15536248pff.172.2019.02.28.18.01.38; Thu, 28 Feb 2019 18:01:54 -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=@google.com header.s=20161025 header.b=C9yRUYRY; 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 S1733004AbfCABCM (ORCPT + 99 others); Thu, 28 Feb 2019 20:02:12 -0500 Received: from mail-it1-f193.google.com ([209.85.166.193]:38975 "EHLO mail-it1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732969AbfCABCM (ORCPT ); Thu, 28 Feb 2019 20:02:12 -0500 Received: by mail-it1-f193.google.com with SMTP id l15so18847106iti.4 for ; Thu, 28 Feb 2019 17:02:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kyWA6LJVhEFVYx4LUEOQTLJtowrXpkRK5QjNOqo2Emg=; b=C9yRUYRYVSCcJywu1iUcJnr1KvxUl92RYDGl8c7XPa4htdgF00yZoJ6ySChVY7hLcn NmpRPH0L/GRfV2+/2w4P7CbUbhVSm/KgeLacJeFDup0lDJ1m9m1+wGTIeVlL5j/D7kKv YZWKkYsDkqxddbEflyyDMJ/C6YwgbS5OXdtYfzqN+gSCp5UegLFaoxttRCdFn1Q1bt0F k714hSfdK0Fo1CUBIZQB2z8czcrmEpBwRYBb7grqw2T0RX1t+ICaFFmYp+oChypN9Kfw pkGCcgszEkrVOIJfqqYZuvSeDDSJfrMbZxGCo9ND4tGpRg4MfxNZXLQ8mQQZO4vA09lk rFpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kyWA6LJVhEFVYx4LUEOQTLJtowrXpkRK5QjNOqo2Emg=; b=Zme6gYqf9n/G18eXqx40FJaBpfnpWe8Vwru3W6NeSrG0xywLTHaqNLb22gM9Q7MsRq zYyxfNxW9S7S8vm1u5FbL2TVLde4BW+Vam4+4OQ0J6hhi3gsypDwbhrLjRaPBTXBYmRj g4m0fJFV3iTvGLiVpqNKJkENL1EqeUoVTi49cym1dXHDPuZiKwQ2y2t27vlxC987Zw1F rgD8KLorVHyNXOxItI5XxJr1OihUKufsSOCWEJ5zqqZ67rs5k0BDGr1eE29gb+rLIwe3 Lk8B6VmjACoevWnhmy7j4IposSVjZQ2wgnTQ3JibsKlXdibOLlLuFJDNSDOqSj4Nz93T MtYA== X-Gm-Message-State: APjAAAWVKnPJZ/BcX+03MPkKKC8sJeeQqRKEHWs1uucCH1k9ehNYkWv+ s6xSBcuTViMywEu65DVXJrkmG4HsBlz71f67T7qmOA== X-Received: by 2002:a02:76c2:: with SMTP id z185mr1181579jab.102.1551402130537; Thu, 28 Feb 2019 17:02:10 -0800 (PST) MIME-Version: 1.0 References: <1551392438.10911.227.camel@linux.ibm.com> <1551398720.10911.270.camel@linux.ibm.com> In-Reply-To: <1551398720.10911.270.camel@linux.ibm.com> From: Matthew Garrett Date: Thu, 28 Feb 2019 17:01:59 -0800 Message-ID: Subject: Re: [PULL REQUEST] Lock down patches To: Mimi Zohar Cc: jmorris@namei.org, LSM List , Linux Kernel Mailing List , David Howells 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 Thu, Feb 28, 2019 at 4:05 PM Mimi Zohar wrote: > > On Thu, 2019-02-28 at 15:13 -0800, Matthew Garrett wrote: > > On Thu, Feb 28, 2019 at 2:20 PM Mimi Zohar wrote: > > > Where/when was this latest version of the patches posted? > > > > They should have followed this, but git-send-email choked on some > > reviewed-by: lines so I'm just trying to sort that out. > > I'm a little perplexed as to why you would send a pull request, before > re-posting the patches with the changes for review. They should be there now. There's no substantive change to the patches, other than having dropped a few from the series. > > It's a little more complicated than this. We can't just rely on IMA > > appraisal - it has to be based on digital signatures, and the existing > > patch only made that implicit by enabling the secure_boot policy. > > Right, which is the reason the IMA architecture specific policy > requires file signatures. [1][2] The current patches seem to require ima signatures - shouldn't this allow ima digests as long as there's an evm signature? > > I > > think we do want to integrate these, but there's a few things we need > > to take into account: > > > > 1) An integrated solution can't depend on xattrs, both because of the > > lagging support for distributing those signatures but also because we > > need to support filesystems that don't support xattrs > > That's not a valid reason for preventing systems that do use IMA for > verifying the kexec kernel image signature or kernel module signatures > from enabling "lock down". This just means that there needs to be > some coordination between the different signature verification > methods. [1][2] I agree, but the current form of the integration makes it impossible for anyone using an IMA-enabled kernel (but not using IMA) to do anything unless they have IMA signatures. It's a problem we need to solve, I just don't think it's a problem we need to solve before merging the patchset. > > 2) An integrated solution can't depend on the current secure_boot > > policy because that requires signed IMA policy updates, but > > distributions have no way of knowing what IMA policy end users require > > Both the "CONFIG_IMA_APPRAISE_REQUIRE_KEXEC_SIGS" and the IMA > architecture policy rules persist after loading a custom policy. > Neither of them require loading or signing a custom policy. The previous version of the lockdown patchset sets the secure_boot policy when lockdown is enabled, which does require that any custom policy be signed. > > In any case, I do agree that we should aim to make this more > > reasonable - having orthogonal signing code doesn't benefit anyone. > > Once there's solid agreement on that we can extend this support. > > > > Having multiple signature verification methods is going to be around > for a while. The solution is to coordinate the signature verification > methods, without requiring both types of signatures. [1][2] Agree, and once we have a solution to this we should integrate that with lockdown. I don't think merging this first makes that any harder. Importantly, this version of the patchset doesn't enable lockdown automatically unless explicitly configured to do so, which means you can build a lockdown kernel without interfering with IMA.