Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6633390yba; Tue, 14 May 2019 10:46:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqwF/ZJW2TGOFSoe3WIJAzcPPwaxApVvLwgDcZqtLVfZrKntyiwE2qC8ih4jJR71gpOCvJT3 X-Received: by 2002:a63:4006:: with SMTP id n6mr39752882pga.424.1557855961467; Tue, 14 May 2019 10:46:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557855961; cv=none; d=google.com; s=arc-20160816; b=vphyTsS5LMOWwhjkoTybn+IuLlsRdpj/lAk7/XOaD7zxt5+B/8WGjg850fql+7iV05 F4/MV/0/SnoThjJnrLLwDYBeSe4F8JRet7cJhyCGtoPjJErSAsT4gdOJeS0RJKQYyw0l VUqqU+NtTumqt9HdX5QMCx921NfDSYP6xi9zF3TPCu6Y5VoxkzfmC1BfdA72TuaFSSXd 8Ilfh8F/pbSpCTQClw3tvKg+rSYgG31/ALtvqiS6ZWVxkOUehpjq8Wx8ph6EL9lVWU12 KPVIUx3QXUpfeCSQDIx2cT1Yg5jbQtLsJsrOooZ/cT2HKmYANtmeHiGysL5ZriiEvj0L G3fQ== 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; bh=ddk3KuhyScY6FDBzyj527AXSPG+YhYrBl3fhglhZfDU=; b=TzXdF+gQi0/OWeYpZYJurxsrcdwKYHeQc4ZaPwlE9XMyvI0vaKGD87TPCVLWHgl355 /GwDxFNV2Xc48MhcZP25gnr9PYva2LwCgBqie4b8ugE7udNQ9oJDyd2HfQQXqrTp19dn XGfti4aEc6IhNJRAAi6hGWz8yFFt4xWa2ggSg/He4QpWeOkjdEuozqAOdLBGW0vgqur6 EjLALDFky3eoGOD+Jm0ZCH8c/3rBR+h0lgBK2mhnTbZdDurCFAVWZTRYCpBAlMyIzpO8 7nbhe/v/JYtqIR66GF8ZkGv0fYB/2YBCcQ5Mpu/iwiM8BIZoTywbFXEHxCx9Jtpay8iu PUXQ== ARC-Authentication-Results: i=1; mx.google.com; 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 co15si21724788plb.330.2019.05.14.10.45.46; Tue, 14 May 2019 10:46:01 -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; 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 S1726879AbfENRok (ORCPT + 99 others); Tue, 14 May 2019 13:44:40 -0400 Received: from lhrrgout.huawei.com ([185.176.76.210]:32941 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726229AbfENRok (ORCPT ); Tue, 14 May 2019 13:44:40 -0400 Received: from LHREML711-CAH.china.huawei.com (unknown [172.18.7.108]) by Forcepoint Email with ESMTP id 9D28C725DEC5245686F9; Tue, 14 May 2019 18:44:38 +0100 (IST) Received: from [10.220.96.108] (10.220.96.108) by smtpsuk.huawei.com (10.201.108.34) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 14 May 2019 18:44:35 +0100 Subject: Re: [PATCH v2 0/3] initramfs: add support for xattrs in the initial ram disk To: Arvind Sankar CC: Rob Landley , Arvind Sankar , , , , , References: <20190512194322.GA71658@rani.riverdale.lan> <3fe0e74b-19ca-6081-3afe-e05921b1bfe6@huawei.com> <4f522e28-29c8-5930-5d90-e0086b503613@landley.net> <49965ffd-dd57-ffe5-4a2f-73cdfb387848@landley.net> <20190514152704.GB37109@rani.riverdale.lan> <20190514155739.GA70223@rani.riverdale.lan> From: Roberto Sassu Message-ID: Date: Tue, 14 May 2019 19:44:42 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <20190514155739.GA70223@rani.riverdale.lan> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.220.96.108] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/14/2019 5:57 PM, Arvind Sankar wrote: > On Tue, May 14, 2019 at 11:27:04AM -0400, Arvind Sankar wrote: >> It's also much easier to change/customize it for the end >> system's requirements rather than setting the process in stone by >> putting it inside the kernel. > > As an example, if you allow unverified external initramfs, it seems to > me that it can try to play games that wouldn't be prevented by the > in-kernel code: setup /dev in a weird way to try to trick /init, or more > easily, replace /init by /bin/sh so you get a shell prompt while only > the initramfs is loaded. It's easy to imagine that a system would want > to lock itself down to prevent abuses like this. Yes, these issues should be addressed. But the purpose of this patch set is simply to set xattrs. And existing protection mechanisms can be improved later when the basic functionality is there. > So you might already want an embedded initramfs that can be trusted and > that can't be overwritten by an external one even outside the > security.ima stuff. The same problems exist also the root filesystem. These should be solved regardless of the filesystem used, for remote attestation and for local enforcement. -- HUAWEI TECHNOLOGIES Duesseldorf GmbH, HRB 56063 Managing Director: Bo PENG, Jian LI, Yanli SHI