Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6935143yba; Tue, 14 May 2019 16:56:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqxQO9VsZH2PolNy1zuOWdy2Q20EBj67aOklbbFT52ntGCclMgH06fDM7pbM23ht0HBM5a9u X-Received: by 2002:a63:374b:: with SMTP id g11mr41373316pgn.421.1557878160343; Tue, 14 May 2019 16:56:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557878160; cv=none; d=google.com; s=arc-20160816; b=U6Ygk21PJtwNlyO/C5+4E9l2BtAhBj4CdK5B7cZt4VIkNQzRYf5EjLkkYD837iKtRC wDwUB+WfPztVkZ6YVeap+C2El3yeFlTJGM+HhE2GqAsvyG/f336Vg8QeWNgJi2srvUT7 s3sVfm5jgEtj9DKcp/95hi2sCds2R9K8MiBrktNVsX252BwPVLfUME8OGdEp8dqHXOKg DeeTtzEOOUmwoTmGDi7hMUzQAZ8xFh54z/KXrtqHeBcPxeTkdptmmOj/qb9xMMc7pK2c RXHNupt5iSP4Y2tjgrjytivf8S6BFVVd23pXkybfeI9mAaerUkqY0ofttqfs/jskkiUy h7gg== 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=QSnT0/c1PDpDuEwkGSl7Aqi/J/6QpmHW5UELPrcw3/g=; b=fdHlIr1b6xwS3Tf85lt2duGlf/y5mUWOOmzZoOVNMNxf0c9D7zhRvpEr8U5OXXpkAp AbLJ6YT59HJv+vKtUgmy35KxwylE1WH2nGr9Ou88I/0nre19P2Rc7B0ofjWrrSst9DKW s9sDVJcUjOsgtb112/LHBIOK691hFvaNrAa9HrttOBC3GkEir/7nYJX0v9EVmwiLCT52 K46YNA9A7XNDRzTlMcnWIAMViMSFI6w9BmspY3ihOzx7JnsArVbHrq0NLz4ZQIlfTLKJ WHuOzLyIKvOgTwwn8NxH8I8X0At2rsIAPrT5yvsnhasJATKmD8vi9tKNOmn5V4+HBXyp 1ZjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@hansenpartnership.com header.s=20151216 header.b="dZV9RO/I"; dkim=fail header.i=@hansenpartnership.com header.s=20151216 header.b="dZV9RO/I"; 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 n7si296020pgu.182.2019.05.14.16.55.44; Tue, 14 May 2019 16:56:00 -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="dZV9RO/I"; dkim=fail header.i=@hansenpartnership.com header.s=20151216 header.b="dZV9RO/I"; 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 S1726599AbfENXyP (ORCPT + 99 others); Tue, 14 May 2019 19:54:15 -0400 Received: from bedivere.hansenpartnership.com ([66.63.167.143]:53400 "EHLO bedivere.hansenpartnership.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726265AbfENXyP (ORCPT ); Tue, 14 May 2019 19:54:15 -0400 Received: from localhost (localhost [127.0.0.1]) by bedivere.hansenpartnership.com (Postfix) with ESMTP id 58BE08EE109; Tue, 14 May 2019 16:54:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=hansenpartnership.com; s=20151216; t=1557878054; bh=j9GFywY1HLyNTdpWDqU6DRZqFaBO1GawDh8yt+cMaqU=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=dZV9RO/IA1wL58RbfktzvhF4K1xZl/4zGz3TLRxcm5GlTLjC8covABFSucBWREaS9 OSBPyqqim2IdYRtdQFIEyy2fzVtY/Vq9MwU3Jngf6/fjS6Z38hRGtcegh99WZyvLSm aWkuGylJdngUC4YlL6U49VhosDHd1xpTt5qV56rc= 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 woy7T4AMZn2a; Tue, 14 May 2019 16:54:14 -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 9FDBB8EE0ED; Tue, 14 May 2019 16:54:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=hansenpartnership.com; s=20151216; t=1557878054; bh=j9GFywY1HLyNTdpWDqU6DRZqFaBO1GawDh8yt+cMaqU=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=dZV9RO/IA1wL58RbfktzvhF4K1xZl/4zGz3TLRxcm5GlTLjC8covABFSucBWREaS9 OSBPyqqim2IdYRtdQFIEyy2fzVtY/Vq9MwU3Jngf6/fjS6Z38hRGtcegh99WZyvLSm aWkuGylJdngUC4YlL6U49VhosDHd1xpTt5qV56rc= Message-ID: <1557878052.2873.6.camel@HansenPartnership.com> Subject: Re: [PATCH v2 0/3] initramfs: add support for xattrs in the initial ram disk From: James Bottomley To: Rob Landley , Andy Lutomirski Cc: Arvind Sankar , LKML , Linux API , Linux FS Devel , linux-integrity , initramfs@vger.kernel.org Date: Tue, 14 May 2019 16:54:12 -0700 In-Reply-To: <4da3dbda-bb76-5d71-d5c5-c03d98350ab0@landley.net> References: <20190512194322.GA71658@rani.riverdale.lan> <3fe0e74b-19ca-6081-3afe-e05921b1bfe6@huawei.com> <4f522e28-29c8-5930-5d90-e0086b503613@landley.net> <1557861511.3378.19.camel@HansenPartnership.com> <4da3dbda-bb76-5d71-d5c5-c03d98350ab0@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 18:39 -0500, Rob Landley wrote: > On 5/14/19 2:18 PM, James Bottomley wrote: > > > 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. > > You can have a built-in and an external initrd? The second extracts > over the first? (I know because once upon a time conflicting files > would append. It sounds like the desired behavior here is O_EXCL fail > and move on.) Technically yes, because the first initrd could find the second by some predefined means, extract it to a temporary directory and do a pivot_root() and then the second would do some stuff, find the real root and do a pivot_root() again. However, while possible, wouldn't it just add to the rendezvous complexity without adding any benefits? even if the first initrd is built and signed by the distro and the second is built by you, the first has to verify the second somehow. I suppose the second could be tar extracted, which would add xattrs, if that's the goal? James