Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp6825964ybl; Wed, 15 Jan 2020 10:47:56 -0800 (PST) X-Google-Smtp-Source: APXvYqxFSoxLA2usLC8Vw4aleHpR/z+JNl48b4hPh8Q/tmp/CmZ7CneCLlzIBky/WrOW8aAHBiUb X-Received: by 2002:a05:6830:1d7a:: with SMTP id l26mr3642988oti.138.1579114076166; Wed, 15 Jan 2020 10:47:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579114076; cv=none; d=google.com; s=arc-20160816; b=Su8zkm4Asqsfq4tSWBia7L+xC6C+M0BIbPemMEsyolQaUyhmn3eWgFwgzQAx7wHerO na+JZWtfBna9WC97kaVGepJeNtwqgMvbqqCre6f6Jb1XjJyN4ccbdosC9f7p9Mw+Oslg 8yVW/vmI2fvDqXriyoPcbH34YT6IZT/iD0+Ydim7w1FMUikDI1gQmBrrKq1pOMEQNfwS HWALsYrQd68oyKqJD7QT1D5HpVhkccd3gxZxBveYxHSGtxUpDQ8I7U8Qd18l6nan/R9y pmKKzfEf7xLUOWP6vvs4ArTL0n+/f5H/UIVW5u931/ZqYww9qExJyR62bT/4oYtnI86f SJaA== 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 :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=XhG7oKm+eUCDXzWAmBj1ApEpGRAwwk7JTkSRtwr4uDc=; b=0hMhcg20PUbt/qNFNJbWJinszT8GtYVXjVJgQD33N8y9uOnDe1jaxQpzFTMe6hFUyj 4SL2VYImGLys2xcf9YZdKimPfE8PwhN6lS5PRdt/GMJoi5Hi9nDl6kzvFaw5hFUNkueh qctly48NOhL5m9lFvz7Iaw/HXf2OVa+dQy4xU2FOTcREyrp0+Y3xFo/kn8qqoyg3RWqs o2YVBFvi3d/5gnuW0A1PhSNnS59AtDGsLhQ88LneAp9suhjcXTh0RqanfN5pNoZUTzWL AhTotaPv3A86D4EHTpwt0T82r9RPSEQNOl6QMuMfB9JfmPXHHd3je+3xvcn2P+vR4f2S w+8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=SKYJhUZL; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q26si9236149oij.38.2020.01.15.10.47.44; Wed, 15 Jan 2020 10:47:56 -0800 (PST) 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=@chromium.org header.s=google header.b=SKYJhUZL; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729057AbgAOSpv (ORCPT + 99 others); Wed, 15 Jan 2020 13:45:51 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:34997 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729012AbgAOSpv (ORCPT ); Wed, 15 Jan 2020 13:45:51 -0500 Received: by mail-wm1-f66.google.com with SMTP id p17so1100345wmb.0 for ; Wed, 15 Jan 2020 10:45:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=XhG7oKm+eUCDXzWAmBj1ApEpGRAwwk7JTkSRtwr4uDc=; b=SKYJhUZLU3m5uB+IwXigYsHxvV5o1M+7PQOjuaa8htp7C1d128jxoaBhSeOwMbUuZ5 asWpNenhoM1ou5bOufNnZam1MHduqFELyxinQh1KeJSyJE8ICbIB47RiLkeBZdpguPWq NeayeqR6/qGB194gVdes9ah3JpJsuW5dMNdh8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=XhG7oKm+eUCDXzWAmBj1ApEpGRAwwk7JTkSRtwr4uDc=; b=K4M3FIxbmGBRMpniSm9UAZer5S+hZ5+jDoaDYKwyUl1Egtii6w7yvMif9cK5YLiNaa OtufSaMed6G7PzHkQBF9A0kqja6zkSGLuCRBrHNxpIiYKQB2mzMeuIe2QmBD9Uiea4cz d2F0LkmQh+ja3GVbwVUYVj9dtb4e3dznDjdfZQHvj6CrmzgdCLRGzXt5CX/bgnlVdmjx lctfi1bdeRjDj9GwymLsENMPlsjqWGZQOxd1lLnvNc6NnqFnBPXSr25JvkqDpVayCGAZ PaQ1d+txUpETnVvxycIgsSHzK9buliMDw3HwVflkBjkpNddKFXUdMAhLRALaFu9cYDx0 bHJA== X-Gm-Message-State: APjAAAUvITgc+OcPODyg46ZtDW1rT7zUCIgTkFlBBiy3dlyXM0xUohsx rVa5Q3DXyz5irt5p4d+IAd6hkg== X-Received: by 2002:a1c:6755:: with SMTP id b82mr1380457wmc.126.1579113948983; Wed, 15 Jan 2020 10:45:48 -0800 (PST) Received: from revest ([37.165.158.17]) by smtp.gmail.com with ESMTPSA id h17sm26445192wrs.18.2020.01.15.10.45.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jan 2020 10:45:48 -0800 (PST) Message-ID: Subject: Re: [PATCH v2] ima: add the ability to query the hash of a given file. From: Florent Revest To: Mimi Zohar , KP Singh Cc: linux-integrity@vger.kernel.org, mjg59@google.com, nramas@linux.microsoft.com, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, Florent Revest Date: Wed, 15 Jan 2020 19:45:43 +0100 In-Reply-To: <1579113367.5032.19.camel@linux.ibm.com> References: <20200106162524.164650-1-revest@chromium.org> <20200113104830.GA28588@google.com> <1579113367.5032.19.camel@linux.ibm.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5-1.1 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 Wed, 2020-01-15 at 13:36 -0500, Mimi Zohar wrote: > On Mon, 2020-01-13 at 11:48 +0100, KP Singh wrote: > > On 06-Jan 17:25, Florent Revest wrote: > > > From: Florent Revest > > > > > > This allows other parts of the kernel (perhaps a stacked LSM > > > allowing > > > system monitoring, eg. the proposed KRSI LSM [1]) to retrieve the > > > hash > > > of a given file from IMA if it's present in the iint cache. > > > > > > It's true that the existence of the hash means that it's also in > > > the > > > audit logs or in > > > /sys/kernel/security/ima/ascii_runtime_measurements, > > > but it can be difficult to pull that information out for every > > > subsequent exec. This is especially true if a given host has > > > been up > > > for a long time and the file was first measured a long time ago. > > > > > > This is based on Peter Moody's patch: > > > https://sourceforge.net/p/linux-ima/mailman/message/33036180/ > > > > > > [1] https://lkml.org/lkml/2019/9/10/393 > > > > > > Signed-off-by: Florent Revest > > > > Thanks for adding this Florent! > > > > Reviewed-by: KP Singh > > Thanks, this patch is now queued in next-integrity-testing. Good to hear Mimi! Thank you. I would just like to make sure that you queued the v3 of this patch though...? (this thread is for the v2 :) ) The v3 includes a couple of comments you asked for.