Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5552750yba; Mon, 13 May 2019 12:53:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqwYV6oMvlTwmFNDO8KlAkBwzU3h1FzuLTz9wf2eupPeXrB/cIVC2BXJtzlGMD9uLJypYd0a X-Received: by 2002:a63:445d:: with SMTP id t29mr33720530pgk.303.1557777235602; Mon, 13 May 2019 12:53:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557777235; cv=none; d=google.com; s=arc-20160816; b=P73O58fklj4lr6n76wh88feOksK6to/HA4qemZoJAk7Q8YDY4sUJwLuYOfOBgBu3PY CX3x4b5e/q6pnJ8lIw/XuqukE+uHqGSVdcNHc+K2Pj2Q8HBn2Rk5aX+cftwz3P8dfC5a n5NVm9/0c3tesWMbBivGZhzMsFW88IH2g8doJQQAyYynSq7Uz3l6Kfx3n1H7QJY0pQMu mADF1qZLQq8Z63Rf9qBmS6BxauxU5EnlKiQODF+86aKVoL3YLbv8ifHkUeNUvZnRDqjz efBjc+z4AqNCRuWgkeBcG19x8QgH7hJApwrL+JAe+HIY/YKkBMuW4Gab7aVCP3547s3s b5sA== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:date:from:dkim-signature; bh=fcj7AotgrHgaGk9eGLmWk2zeSnn906Cpfa2iryM3DoI=; b=ud2vAtf740N7GlsK5sk7YB9d1wKM4O0vgOJ1qgNt/GpL+rK4l27FpAcxCfUbLL+AjE 33ZG5jYeWdin2Lz43BdjJisM1FHku3UnritEFqMp6MRtsVlErWTNWlDGVyWOiucef8fM vs7imJ9nmaTTOP++eV8rlLfTC885ttXU5QQXxNR8WamLlMaW4PAYL3fSOCjHjGIUkmej 2ujP6h9D/m4BwC7TzvP4XLoeeQjWa60yoHJwZEsuvOO5KbSzS+Qqqn4R8Qt2cTlhwknE rnvWhzVS1Tt+/lpq2mt8hlptLgSVlMyv5Oh19p45ZGqOy+LqtjX2gXBaHLYTm7mNgg/z auNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=SQuY2s+g; 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 a17si7413590pfa.108.2019.05.13.12.53.39; Mon, 13 May 2019 12:53:55 -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=SQuY2s+g; 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 S1728041AbfEMSrt (ORCPT + 99 others); Mon, 13 May 2019 14:47:49 -0400 Received: from mail-qk1-f194.google.com ([209.85.222.194]:39278 "EHLO mail-qk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727986AbfEMSrs (ORCPT ); Mon, 13 May 2019 14:47:48 -0400 Received: by mail-qk1-f194.google.com with SMTP id z128so8693728qkb.6; Mon, 13 May 2019 11:47:47 -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:content-transfer-encoding:in-reply-to :user-agent; bh=fcj7AotgrHgaGk9eGLmWk2zeSnn906Cpfa2iryM3DoI=; b=SQuY2s+gOhhvRTsfAUBFH8LblnHzjFKVtQhD/ihRPsOB1DqyVzD7Xi9YbAmZb4Pvhp kKP0V+5w7UIAUrpkSD9JLaZbwAXLCTHvW7eaQ/mEMTNGQB40/4n8tgbWfXZ/4G2zW6Ds 7E2h7E2DbLtKiFnN7K8LldVs7Hr00QujeCB/kKbDgjKuBjhTwnW+JBdrQm7JYY24v8RT Tw7OIi/fi6263Hsrvk66MGEe7JsiyomynLBElEePKLWgjiQrw0eMU/E+u06hTFjxo6sb Fqs08/Wd3j+ANlJUFbuqQHK0gbt7dVAKrvbS1KTWyBLhqFsLmeK7omiu8V5RLxEgjWe3 6WVw== 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 :content-transfer-encoding:in-reply-to:user-agent; bh=fcj7AotgrHgaGk9eGLmWk2zeSnn906Cpfa2iryM3DoI=; b=V4Qv5paOiCPG1ZORRwNyz11OuemVxy5uQ77xsV/rKlLqRGSsRP3pp7N7ZhNC1TMwCl qaXThQ3ZGUa+vNuF9Em8c3ucTt4t53bNzhYOIW3ZIzvR4M9oVErrVSjvf4uaSsbGXX0j DN5fx/1f5ff1AhksCFxx4ngD53OLntg60RjiwI1FFUAcjklwo8OYShJuPrFLNw9aMU6c 9fwdjaIw/ASkTSzpwVt359k2L6f9dUIhNG+mWbDLmoxy39TFlqLS+afQB7utSCtJk/sU VxH9O5WOpfftQZpdwz2yuft9Vt4/TB40P9YwAwiZ7lY50YnbfT3/bi+RWxcJXYnETDoW tUIw== X-Gm-Message-State: APjAAAUWhSzqqMr0kldpy9QNgW0kI+S4fsk0qNimFmnYzUnV9m20aWt2 WmQj2sWMREo0RrS+VLrjVdE= X-Received: by 2002:a05:620a:16b4:: with SMTP id s20mr23939911qkj.34.1557773267186; Mon, 13 May 2019 11:47:47 -0700 (PDT) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id x6sm553163qti.88.2019.05.13.11.47.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 May 2019 11:47:46 -0700 (PDT) From: Arvind Sankar X-Google-Original-From: Arvind Sankar Date: Mon, 13 May 2019 14:47:45 -0400 To: Mimi Zohar Cc: Arvind Sankar , Roberto Sassu , Rob Landley , 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: <20190513184744.GA12386@rani.riverdale.lan> References: <20190512194322.GA71658@rani.riverdale.lan> <3fe0e74b-19ca-6081-3afe-e05921b1bfe6@huawei.com> <4f522e28-29c8-5930-5d90-e0086b503613@landley.net> <20190513172007.GA69717@rani.riverdale.lan> <20190513175250.GC69717@rani.riverdale.lan> <1557772584.4969.62.camel@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1557772584.4969.62.camel@linux.ibm.com> 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 Mon, May 13, 2019 at 02:36:24PM -0400, Mimi Zohar wrote: > > > > How does this work today then? Is it actually the case that initramfs > > > just cannot be used on an IMA-enabled system, or it can but it leaves > > > the initramfs unverified and we're trying to fix that? I had assumed the > > > latter. > > Oooh, it's done not by starting IMA appraisal later, but by loading a > > default policy to ignore initramfs? > > Right, when rootfs is a tmpfs filesystem, it supports xattrs, allowing > for finer grained policies to be defined.  This patch set would allow > a builtin IMA appraise policy to be defined which includes tmpfs. > > Mimi > Ok, but wouldn't my idea still work? Leave the default compiled-in policy set to not appraise initramfs. The embedded /init sets all the xattrs, changes the policy to appraise tmpfs, and then exec's the real init? Then everything except the embedded /init and the file with the xattrs will be appraised, and the embedded /init was verified as part of the kernel image signature. The only additional kernel change needed then is to add a config option to the kernel to disallow overwriting the embedded initramfs (or at least the embedded /init).