Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6718225yba; Tue, 14 May 2019 12:19:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqyMV5qZ/ctU6+JosiAtl+IkiqwDVgehsZLDo1yAGyZ+1vaRJ0STDzlShR6gKHoHTHU/js9D X-Received: by 2002:a65:5106:: with SMTP id f6mr40062452pgq.253.1557861599421; Tue, 14 May 2019 12:19:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557861599; cv=none; d=google.com; s=arc-20160816; b=RHYl6UP4dldNKXzS6f3C4StbWrSjrVokfPJlkycWldG4RfO6YzijgJPH6Srb13Rud0 bo4Dmgyk0CSsZ+lUzPWWYpRGFrmcLT49M/KwrE9gJtoxjNNnUwbnuBnIIV4M7Bdodcgi In9+9wvqBcSF3d/dqdrd/L1Bh9WNrPGRdfralwrviCCSssbC97SabZ4ra0p+55pkatLE MuzMtZPAXI5/6deMJzIiS7xBPgEBKs6nTpyLGVmjaVnuVHPWtw8+NDxOEb5ADz25eNlj llXnWlDybP602Yjfgn7UtrrYKqTjH5NolAq7E0H0sK1+Bt5tXt6L7/tKwZbakzhaXl97 qPxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature:dkim-signature; bh=obkdtYHmwJInvW1S41/JbYR2Qm8YIkdOJPE/91U2CBU=; b=gDR66aS+2OEg79Xpw/HX8agBSAuBpCOtxAhVPNBomaNMukwX46is5xakwS9ozcaX1D iMJ604j02vhsE4y/uhawp8XgLj2+YDQIvpa6DCppiY23n1dJ87MoUi4sQJ5GZEbSvlWA tsRO1K/n8iprpl3uym8A7pqd8u1GdOf9RT1mpBzhHNMdla2vzjp9eWNAiVT4fx98xnoS /ssPHSMjRwPKmdFXBZKTVI8ckCWHPnNzQJlKSEBI3oAH2OpBRkPcg71eE5NKf9BvTm/c JP9sEUfUT3FnRsFXmAbpjW9hyg6POpTZ63Ab4E8MvawyRLagEojNuw9F7P188tqMc/Em 4+Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@hansenpartnership.com header.s=20151216 header.b=FYrdoogo; dkim=fail header.i=@hansenpartnership.com header.s=20151216 header.b=JeEEo+Nf; 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=fail (p=NONE sp=NONE dis=NONE) header.from=hansenpartnership.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d11si21944207pla.371.2019.05.14.12.19.43; Tue, 14 May 2019 12:19:59 -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=fail header.i=@hansenpartnership.com header.s=20151216 header.b=FYrdoogo; dkim=fail header.i=@hansenpartnership.com header.s=20151216 header.b=JeEEo+Nf; 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=fail (p=NONE sp=NONE dis=NONE) header.from=hansenpartnership.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726216AbfENTSf (ORCPT + 99 others); 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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