From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B1D5CC4338F for ; Mon, 2 Aug 2021 10:38:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8D17460F9E for ; Mon, 2 Aug 2021 10:38:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233167AbhHBKis (ORCPT ); Mon, 2 Aug 2021 06:38:48 -0400 Received: from mo4-p01-ob.smtp.rzone.de ([85.215.255.54]:30015 "EHLO mo4-p01-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232553AbhHBKis (ORCPT ); Mon, 2 Aug 2021 06:38:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1627900712; s=strato-dkim-0002; d=thson.de; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=DIP3I6RkjVHsVygWJupDRROPDy4l0f131Hll/tYq4Es=; b=f+rxEr7fnFTMped9cXehWX+Eyqk6kARXB2fN2XMDyqFNSH6VfXbSNlRUyN3yeJ2HQJ ODO7LIrOZ0sRZUKhjfk6uRIM7XG4AmCskDZTDKAnlUUB3LdCGaYmv8yjmscHc99We1rn eVKj98ljQ1bkKR8BHTuXMHl32bbWsqAzemJcPlYhkUfxvJMinLIuHzFxuWPk1KI9hkzt yOOnuU/KBDXRIFwEiGs6zuW/eIVyuBDim72dgdpiRULAPK+1gDYjHU1AO7NPuAbYzOVm STB5O0nfmgjbHKbpG+nCD107+03vb19KBnrhm7W5mRL18eoitUIYgZkYm8uGAosTVlSu pPBw== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":PHkGeUmrW+uCZmxs998QJRUX30nOwJd7nOD9sw/xoauycprg5uef7cgCEpy7sPc=" X-RZG-CLASS-ID: mo00 Received: from USER-PC.fritz.box by smtp.strato.de (RZmta 47.28.1 DYNA|AUTH) with ESMTPSA id t06ddcx72AcW8Oj (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 2 Aug 2021 12:38:32 +0200 (CEST) From: Thore Sommer To: tusharsu@linux.microsoft.com Cc: agk@redhat.com, dm-devel@redhat.com, linux-integrity@vger.kernel.org, nramas@linux.microsoft.com, public@thson.de, snitzer@redhat.com, zohar@linux.ibm.com Subject: Re: [dm-devel] [PATCH 0/7] device mapper target measurements using IMA Date: Mon, 2 Aug 2021 12:38:23 +0200 Message-Id: <20210802103823.199091-1-public@thson.de> X-Mailer: git-send-email 2.32.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org Hi Tushar, thank you for answering my questions and looking at my suggestions. > I can update the verity_status() to measure if v->signature_key_desc is > set. > > Something like: > DMEMIT("signature_key_desc_present=%c,", v->signature_key_desc ? 'y' : > 'n'); If my understanding that this entry is only set if the signature was validated is correct then this should work. > Please note – even if we measure signature_key_desc (full string or just > its presence): in order to use it with the keyrings, the IMA policy also > needs to be set to measure key rings (using "measure func=KEY_CHECK > ..."). It is independent from measuring the device mapper data (which is > measured when the policy is set to “measure func=CRITICAL_DATA > label=device-mapper ..."). > > Therefore measuring keyrings together (i.e. in the same IMA log) with DM > data is not always guaranteed, since it is dictated by how the IMA > policy is configured. Thanks for pointing that out. Currently we don't measure the keyrings but when we enable remote attestation for dm-verity we'll make sure that our IMA policy also measures the keyrings. Regards, Thore From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C96BC4338F for ; Mon, 2 Aug 2021 10:42:03 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DAA9260E76 for ; Mon, 2 Aug 2021 10:42:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org DAA9260E76 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=thson.de Authentication-Results: mail.kernel.org; spf=tempfail smtp.mailfrom=redhat.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-571-gBo8Tg_qMUSzLXiSBK9CVw-1; Mon, 02 Aug 2021 06:42:00 -0400 X-MC-Unique: gBo8Tg_qMUSzLXiSBK9CVw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6D281107ACF5; Mon, 2 Aug 2021 10:41:53 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 02AAA1002D71; Mon, 2 Aug 2021 10:41:51 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 323DD4BB7C; Mon, 2 Aug 2021 10:41:46 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 172AfiRc011074 for ; Mon, 2 Aug 2021 06:41:45 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9C98D100320C; Mon, 2 Aug 2021 10:41:44 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 97F5F1005B77 for ; Mon, 2 Aug 2021 10:41:42 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E9B598D138E for ; Mon, 2 Aug 2021 10:41:41 +0000 (UTC) Received: from mo4-p01-ob.smtp.rzone.de (mo4-p01-ob.smtp.rzone.de [85.215.255.52]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-281-QCXfyo3mMRm385J4U8RPjg-1; Mon, 02 Aug 2021 06:41:39 -0400 X-MC-Unique: QCXfyo3mMRm385J4U8RPjg-1 X-RZG-AUTH: ":PHkGeUmrW+uCZmxs998QJRUX30nOwJd7nOD9sw/xoauycprg5uef7cgCEpy7sPc=" X-RZG-CLASS-ID: mo00 Received: from USER-PC.fritz.box by smtp.strato.de (RZmta 47.28.1 DYNA|AUTH) with ESMTPSA id t06ddcx72AcW8Oj (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 2 Aug 2021 12:38:32 +0200 (CEST) From: Thore Sommer To: tusharsu@linux.microsoft.com Date: Mon, 2 Aug 2021 12:38:23 +0200 Message-Id: <20210802103823.199091-1-public@thson.de> In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: dm-devel@redhat.com Cc: snitzer@redhat.com, zohar@linux.ibm.com, nramas@linux.microsoft.com, dm-devel@redhat.com, public@thson.de, linux-integrity@vger.kernel.org, agk@redhat.com Subject: Re: [dm-devel] [PATCH 0/7] device mapper target measurements using IMA X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dm-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 SGkgVHVzaGFyLAoKdGhhbmsgeW91IGZvciBhbnN3ZXJpbmcgbXkgcXVlc3Rpb25zIGFuZCBsb29r aW5nIGF0IG15IHN1Z2dlc3Rpb25zLgoKPiBJIGNhbiB1cGRhdGUgdGhlIHZlcml0eV9zdGF0dXMo KSB0byBtZWFzdXJlIGlmIHYtPnNpZ25hdHVyZV9rZXlfZGVzYyBpcyAKPiB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