From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A62AFC04AB4 for ; Tue, 14 May 2019 19:18:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 718BC216F4 for ; Tue, 14 May 2019 19:18:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=hansenpartnership.com header.i=@hansenpartnership.com header.b="FYrdoogo"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=hansenpartnership.com header.i=@hansenpartnership.com header.b="JeEEo+Nf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726036AbfENTSf (ORCPT ); Tue, 14 May 2019 15:18:35 -0400 Received: from bedivere.hansenpartnership.com ([66.63.167.143]:48764 "EHLO bedivere.hansenpartnership.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726013AbfENTSf (ORCPT ); Tue, 14 May 2019 15:18:35 -0400 Received: from localhost (localhost [127.0.0.1]) by bedivere.hansenpartnership.com (Postfix) with ESMTP id EEA368EE109; Tue, 14 May 2019 12:18:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=hansenpartnership.com; s=20151216; t=1557861514; bh=kEo/SVpo1ALfduxjBL6j4BgvcDYrykkEFotN47vMdpo=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=FYrdoogoLnISQM1Gna4zR8dFz0m1XqoyYVy6MoFrTEVnU1hi7m7DSZV3h/A2XZcZK HsqRkNweLASCPrYAmWtU/51Zax8vrUpzjyu751TcYxE1QZc61MAVSntV/NhaZG+E5j phj1QTEdYcMFyulxVm8BeM7Q6aZReGPxpRKST4Lk= Received: from bedivere.hansenpartnership.com ([127.0.0.1]) by localhost (bedivere.hansenpartnership.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QdQKJpAzFTsY; Tue, 14 May 2019 12:18:33 -0700 (PDT) Received: from [153.66.254.194] (unknown [50.35.68.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bedivere.hansenpartnership.com (Postfix) with ESMTPSA id 4F2438EE0ED; Tue, 14 May 2019 12:18:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=hansenpartnership.com; s=20151216; t=1557861513; bh=kEo/SVpo1ALfduxjBL6j4BgvcDYrykkEFotN47vMdpo=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=JeEEo+NfnkowNE+9caNm6hsbGtn0T6bU8NF+hBTf94ux0+YI/Yfe8OsASW6MhvDb3 wtySyGjG0MToAmT+lQFezolyaeD/lHNHpWchGwk0XgpylgDu2zsE3rXzmufIdJJEXa ko7T09bgCGxuMzfgUSW2rrqIqCefgkntCBg38DTI= Message-ID: <1557861511.3378.19.camel@HansenPartnership.com> Subject: Re: [PATCH v2 0/3] initramfs: add support for xattrs in the initial ram disk From: James Bottomley To: Andy Lutomirski , Roberto Sassu Cc: Rob Landley , Arvind Sankar , LKML , Linux API , Linux FS Devel , linux-integrity , initramfs@vger.kernel.org Date: Tue, 14 May 2019 12:18:31 -0700 In-Reply-To: References: <20190512194322.GA71658@rani.riverdale.lan> <3fe0e74b-19ca-6081-3afe-e05921b1bfe6@huawei.com> <4f522e28-29c8-5930-5d90-e0086b503613@landley.net> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.6 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-integrity-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org On Tue, 2019-05-14 at 08:19 -0700, Andy Lutomirski wrote: > On Mon, May 13, 2019 at 5:47 AM Roberto Sassu om> wrote: > > On 5/13/2019 11:07 AM, Rob Landley wrote: [...] > > > > The only reason why opening .xattr-list works is that IMA is > > > > not yet initialized (late_initcall vs rootfs_initcall). > > > > > > Launching init before enabling ima is bad because... you didn't > > > think of it? > > > > No, because /init can potentially compromise the integrity of the > > system. > > I think Rob is right here. If /init was statically built into the > kernel image, it has no more ability to compromise the kernel than > anything else in the kernel. What's the problem here? The specific problem is that unless you own the kernel signing key, which is really untrue for most distribution consumers because the distro owns the key, you cannot build the initrd statically into the kernel. You can take the distro signed kernel, link it with the initrd then resign the combination with your key, provided you insert your key into the MoK variables as a trusted secure boot key, but the distros have been unhappy recommending this as standard practice. If our model for security is going to be to link the kernel and the initrd statically to give signature protection over the aggregate then we need to figure out how to execute this via the distros. If we accept that the split model, where the distro owns and signs the kernel but the machine owner builds and is responsible for the initrd, then we need to explore split security models like this proposal. James