Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6923504yba; Tue, 14 May 2019 16:40:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqwSmiZ5pt7IERqAnmyV8NmnhfFWbqy+XVzQEhyW4pFuFZcEWf73yWEk0WV2liQLl8nP7pJY X-Received: by 2002:a17:902:28ab:: with SMTP id f40mr12715591plb.295.1557877221348; Tue, 14 May 2019 16:40:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557877221; cv=none; d=google.com; s=arc-20160816; b=uPfZJ9VJngxlzhwgtUR29DnzYZPkVZg9OYYzGE8qT/4+SrwAwV7wh6FGV1/0e3WriY NmEzyrvcg74NBnlzIMxcM5qyT5NQ7cjsOCI6ZH2LmyOgAFVWU+zRPc9miCA46EB3x3hW PUU68c/eoyN9+fSN6lmIPMs9WJm+Tkawjh5PmFn3ZXXotilMo8lv6NAd3E9YThvmMeDW V5L2rs2nkG70p4IXcABK+H91cSs/TuxQwBFZKKEysmlDE0PIJNmDQWjqI6Ka6wyfgAOn 7DJNIJ83JhNQ0xLqxt5SJe+B5mtJWJ1SVP8xJp6FcWwFUmOYFJJr9hT42GEXRkQ6BVIX mqBw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=kYvQT6mY9JfQHDpLNfUkCh431/BzUwth4mETG8vnTcM=; b=nEawVFdzq6Jgl1PSoWHP0VSoDRasHKvGaZ7NwuJbqq5E/u9uOAqGW3LDrwrgbUeXA2 4G5+TAX47rUnKhldCSY3at6qcVqsFxj1LC08JiitRPwro+OPDuSdsHi6GWXFzl7Pb+4X RsNg7AUKyheDjyQMR73N4MW7jm6/Tx5QM3BEVS/FMcngtSue3hjXTj86bZW7cY/2tSrq T8Xr2hReJOR3+WzTIGJUFhIFOO7wLGjWp9XaSh7HZ86w73vw0tK3URXLxU6wgQSF90l+ bzXQSnl0qFD05vWPhxUG+8Qa/re3w1RyWeNSj+jMdXq1h+t9JxWSJntpFTp4NYcBDYpC 7lGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@landley-net.20150623.gappssmtp.com header.s=20150623 header.b=rH1kN6xj; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f1si252493pgo.517.2019.05.14.16.40.03; Tue, 14 May 2019 16:40:21 -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=@landley-net.20150623.gappssmtp.com header.s=20150623 header.b=rH1kN6xj; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726511AbfENXio (ORCPT + 99 others); Tue, 14 May 2019 19:38:44 -0400 Received: from mail-oi1-f196.google.com ([209.85.167.196]:45115 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726369AbfENXio (ORCPT ); Tue, 14 May 2019 19:38:44 -0400 Received: by mail-oi1-f196.google.com with SMTP id w144so432447oie.12 for ; Tue, 14 May 2019 16:38:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=landley-net.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=kYvQT6mY9JfQHDpLNfUkCh431/BzUwth4mETG8vnTcM=; b=rH1kN6xjlUQPAimKjhf1g5xol5K7bxpX+XExDwea7rJ/vrEQeHR+gNLXC3ZVH4TQZ9 nB+xK5+dfFBG+AS7/qk8hqyz2HQWexnTzW8k5LJW1xanq4EH8KofvdU+krYoB4fiF8Vt fPWv1qAMT3PwG44QcHmls8cQO1gCx6JOi0ZF7v60B6oUPIayDactRAml6HwN/Z9XOve5 ipNHYxw0+3e1MrlsX6gxLtTtFC7qklUGicX7c6sNm+KGZAZRTO3CR+Vb+0+CyjD/lvna uv4xTwEp5X40rPribrLMqvuk4Sk3d3SkDo1lGscczxN91c6+TpmIAuOPFrsNrQ2x/hlX cVOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=kYvQT6mY9JfQHDpLNfUkCh431/BzUwth4mETG8vnTcM=; b=FZJm563nfe6zLAHW6QJ0hsiL+Ig25XjuJfvT6ah5PZcv4xv4SWt/yQ/dbyWQ3jkb0+ 6cxljQ+NpsF7KzM6g0dyVrqw+aReAUOctH40BvExTQQn+fciumbQAXXrw6kLPV0s1eCw 2CJovS8dBSCRHT5EWmLmO+J/oxa9P3efKjyA9Xjb29Qny7LWpOek1zz6yI2nITlfAgLF 8xZWOlMqib4GbnCrYjkqgr1ofR+zLN9XLb797yTgfxGm85+y2ilGGClCnvbE0qvoJaTy QTUb8OSOwbFB9CroCIQJzrAXwUoGRpa6FEjJOlPmNqr/ONjoxxzcsfFBh2nZOzZ7c7zr cyaA== X-Gm-Message-State: APjAAAU6IL6KBIj4acghPUdgZiUaissqz01QkPGcsgD7x1N3vQfTLgdW WCM6cxULTz3NTPv/FaF/NRDLTA== X-Received: by 2002:aca:f189:: with SMTP id p131mr367929oih.89.1557877123450; Tue, 14 May 2019 16:38:43 -0700 (PDT) Received: from [192.168.1.5] (rrcs-97-77-70-138.sw.biz.rr.com. [97.77.70.138]) by smtp.googlemail.com with ESMTPSA id x64sm141795oia.32.2019.05.14.16.38.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 May 2019 16:38:42 -0700 (PDT) Subject: Re: [PATCH v2 0/3] initramfs: add support for xattrs in the initial ram disk To: James Bottomley , Andy Lutomirski Cc: Arvind Sankar , LKML , Linux API , Linux FS Devel , linux-integrity , initramfs@vger.kernel.org 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> From: Rob Landley Message-ID: <4da3dbda-bb76-5d71-d5c5-c03d98350ab0@landley.net> Date: Tue, 14 May 2019 18:39:16 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <1557861511.3378.19.camel@HansenPartnership.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.) Rob