Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5330yba; Tue, 14 May 2019 18:01:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqwXhzG59TY5wHX8gLwnjMDL6Mohi4+mKPD4h4t+jXhqGpui2fAhNnGTCl+g/+D1ItFYfzhN X-Received: by 2002:a62:1a93:: with SMTP id a141mr11853900pfa.72.1557882103270; Tue, 14 May 2019 18:01:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557882103; cv=none; d=google.com; s=arc-20160816; b=CzurMWkgJyywjk8SZ2mPNSg3tt98ssZmTooztc+AFy+ya33YNDJbV9c0Cf60DGISeB bauHBJT79/T+kuJIZ2fOqG/5mkUA1Z8Z9Q1d1GFzTO/eNvMU9Ogl6m2wTf+uSl1XXKDx WTz+Rt6HpYV27L9DJF4ZLo90LQEAmgcxQI3GUHw/rFazz3Omym2HwuZU5XnTSVGbyNSb 8BhNAiRBmkMWA/8EAdc51o+U4n9i5vHIMbQ38YeXCp/mel56+wLzLNq3u9KelWo4QQrZ SkE/z4yMJdu+3+87ihy/Nlo+vEDYeTVZQtkfkfp1sJM/QAUkp6qdfGC3x+tls/SbT1DE G9MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:date:from:dkim-signature; bh=ARePknXMvJpXvkpoMG1JARn0M1Qc8PURXSCKZdxSijk=; b=dU2IAqwlOSR8BVMxR/GOKf0QiV29d0p60EXmkFsOi7WD9lUFO/i2/S8SydnkJjWG69 Fh/ffos5SuPUKcVHoA2E6Jq2sS07G7wNLgiJ2nC/BO9pRz0JG1HZEcyt/vfxIxZ0fCPk ncoBKf+LpxU1gjpAUGR1Hd13LOWhGT1XD6r7yUrS3HDOr54csti50xnDXiwQMYgV3uAk mQGHKf7wzBueiauYFiitg6lN7ooRXT/i7c1/9PTWsP055IEuDJEPLrwantA1Kwk2nPfC xIUj/3Wik2kx52w/DPtDCpaV3/LIzr0LzIMU+31xwyx4UQAOMymss6LL9VNsZ5WGb5rF XuVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=QX+LrZZz; 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 q90si576634pfa.245.2019.05.14.18.01.26; Tue, 14 May 2019 18:01:43 -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=@gmail.com header.s=20161025 header.b=QX+LrZZz; 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 S1726519AbfEOBAE (ORCPT + 99 others); Tue, 14 May 2019 21:00:04 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:38370 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726044AbfEOBAD (ORCPT ); Tue, 14 May 2019 21:00:03 -0400 Received: by mail-qk1-f196.google.com with SMTP id a64so483108qkg.5; Tue, 14 May 2019 18:00:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ARePknXMvJpXvkpoMG1JARn0M1Qc8PURXSCKZdxSijk=; b=QX+LrZZzP+4rPSDGbeSgFAq0eoC1Lo+cmLh4Oq7MYgTx/7p9ppXtdty8AC4ax/fDB3 jHULiwA5JLFBUXX7ZA3w1zv0McPj6CIZ1bOqxtaJpPKImg4IoVm5fc7/H7Nn8GfMh8Ys e6CZRo6DhGufLF3uxJ24gMBfPuqL+BekVOoekmVnStGfcZev9BmBPY/VRR/AlsF+v847 JijjqOPAjkdCSndncJ8T1JUpQttqXX2jv4usRxSy+ByKnnDCfJT0ECyqrbTAqCh9xdFv aGERs20TySYoyaWj2Y6tUPoQiotMlxCC1GvMwMYOloaPqGCAQ9HYZuejFog5QTTH47WW XBOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:date:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=ARePknXMvJpXvkpoMG1JARn0M1Qc8PURXSCKZdxSijk=; b=MB+tOx8MGNf7ouZUuekaT34KPy1RrZZO64NxpxTM8EKQZxxfCPjs4omHCTkKMBCQnV 2f3kpjdqGdciGpO8BcEYqcdJurtee3HMWD6F37f+9wxG2hEuBj1mBq2fiw9qf5Dlp8NC ijH1AbVrYmwCvB5PSCe4MRRslKcrWIPsGeFOtXaIQudwmnghWsZOBb3j/cpZL87zvLLA KZZjjzElwgbKBqoW3iaBCiKX1G8mYn7IPod5mHeJ+GRT3kUn7Y4ZakDGaroN2eVrlssW 2Wmx9ye2BNjrTUJ1mvsWnzcpEc4DRIigstPyoP4B9ZumIzewt1NtVAE8g17NSDB7j2UX qKcg== X-Gm-Message-State: APjAAAW9fyKdjOJrhY2LQU9qcPWdGprC7jyLmhxXjyTgo7wuKOznMvpc qEgq0CtQGNWrhHJhHnqA6aFnQnFOKTg= X-Received: by 2002:ae9:f818:: with SMTP id x24mr30059222qkh.329.1557882002597; Tue, 14 May 2019 18:00:02 -0700 (PDT) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id f7sm290540qth.41.2019.05.14.18.00.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 May 2019 18:00:02 -0700 (PDT) From: Arvind Sankar X-Google-Original-From: Arvind Sankar Date: Tue, 14 May 2019 21:00:00 -0400 To: Roberto Sassu Cc: Arvind Sankar , Rob Landley , Arvind Sankar , linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-integrity@vger.kernel.org, initramfs@vger.kernel.org Subject: Re: [PATCH v2 0/3] initramfs: add support for xattrs in the initial ram disk Message-ID: <20190515005959.GC88615@rani.riverdale.lan> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 14, 2019 at 07:44:42PM +0200, Roberto Sassu wrote: > 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. > Yeah but it's much easier to enhance it when it lives in userspace and can be tailored to a particular system's requirements. Eg a lot of the issues will disappear if you don't have to allow for external initramfs at all, so those systems can have a very simple embedded /init that doesn't have to do much. > > > 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