Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1468296pxa; Fri, 28 Aug 2020 13:28:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmYRSxxmCKrVopprsrf2AKQCbhY1Rt9faQI+f8pY//HIFNj4aLEKMjSkzWMczcQqRYQB95 X-Received: by 2002:aa7:c4c7:: with SMTP id p7mr532984edr.228.1598646491634; Fri, 28 Aug 2020 13:28:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598646491; cv=none; d=google.com; s=arc-20160816; b=ChqdMJgD19RIAAs48NBtc9YdD0AErTfWK5k6W+s+F35sjDo+taM1+GXyn4pAXgpSWY gsvpzekzVN36b5U7k0FD1z3zHO4ewuMnwW5fhQL3LmtW4mmllus/lvsYHWc7U3NO32cG RduH6t/Olzr/N0AExaHrq8P7gYqvI+E+2SsCWwH3XyGcX8JtQbVaI/pNkH8jqPkmhv9e nZSQmkkEGe0ZOR9Jj3E+P0TP3Bu3mPCyJsldDKPk8hFlQSD/d6vvhHtQRydlmdHY8v1Y DcIvHScbexa6AkTEXm6qocjjB3TasFqRM06+6j0x0pN5hRZsCbwt0meJN6zFymmz00eK gDCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=hECU4hLDw1zrGv3GfjNuIh/mSziIh4QvSgAMdiAuocc=; b=nwQsX3gWaKMZ8iLq0nMC2/h8HGucV1VFTU028H9CrkohrRW/K34E+nLXdJu47Lza7N 31etcISJFbfb+Mbft9ryh5I08s8oeLa7HPqA/EOTaS0nwCrNvJ8KPx9Im9CuI4+d9z/S SkpSP77keQ65Gw8UeIzLLWSvMpxjvT7/xwBRFEmtkjpZZW15mYTRqQ8lLWe04NJVYuDF 5z4+UIJJoJF8R0BDUSjWh4g4sj8dBLJH3lEK/AOq9FIVy7TzLlchaCbnq9akPySeO0OF 0B6lDLI81A4GpGO+Fow600CR6sVYF6xCXgFKxr3hk4d6QhI0t7cRs3jGfPYgHRRP47p+ ABfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=rlpHppJo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v24si389215ejj.497.2020.08.28.13.27.47; Fri, 28 Aug 2020 13:28:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=rlpHppJo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726439AbgH1U1N (ORCPT + 99 others); Fri, 28 Aug 2020 16:27:13 -0400 Received: from linux.microsoft.com ([13.77.154.182]:54118 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726033AbgH1U1M (ORCPT ); Fri, 28 Aug 2020 16:27:12 -0400 Received: from tusharsu-Ubuntu.lan (c-71-197-163-6.hsd1.wa.comcast.net [71.197.163.6]) by linux.microsoft.com (Postfix) with ESMTPSA id 5C72520B7178; Fri, 28 Aug 2020 13:27:11 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 5C72520B7178 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1598646431; bh=hECU4hLDw1zrGv3GfjNuIh/mSziIh4QvSgAMdiAuocc=; h=From:To:Cc:Subject:Date:From; b=rlpHppJoOsNgQysh2heDlPmyXkCalc1TzY4YsrLcm5nRnP5W05VB4piwkQZsZzjeo R/mEVpe+ye1Jn+LIkfUUsMvpk8xrmQxL0mbCG1vGT+iCFVZDuADZxh9gvUl6x0RYev FAkLjqCBrMMsXgiracmLQS27EV0bu+npJZySmU28= From: Tushar Sugandhi To: zohar@linux.ibm.com, agk@redhat.com, snitzer@redhat.com, gmazyland@gmail.com Cc: tyhicks@linux.microsoft.com, sashal@kernel.org, jmorris@namei.org, nramas@linux.microsoft.com, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, dm-devel@redhat.com Subject: [PATCH v3 0/2] dm-devel:dm-crypt: infrastructure for measurement of DM target data using IMA Date: Fri, 28 Aug 2020 13:26:58 -0700 Message-Id: <20200828202700.23086-1-tusharsu@linux.microsoft.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There are several device-mapper targets which contribute to verify the integrity of the mapped devices e.g. dm-integrity, dm-verity, dm-crypt etc. But they do not use the capabilities provided by kernel integrity subsystem (IMA). For instance, the IMA capability that measures several in-memory constructs and files to detect if they have been accidentally or maliciously altered. IMA also has the capability to include these measurements in the IMA measurement list and use them to extend a TPM PCR so that they can be quoted. These TPM PCR extend operations ensure that the tampering with the order of constructs being measured, and tampering with the measured constructs themselves - doesn't go undetected. In general, this capability is used for remote attestation of in-memory constructs and files of interest. As of today,device-mapper targets don't use the benefits of extended TPM PCR quotes and ultimately the benefits of remote attestation. This series bridges this gap, so that all device-mapper targets could take advantage of IMA's measuring and quoting abilities - thus ultimately enabling remote attestation for device-mapper targets. This series is based on the following repo/branch: repo: https://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity.git branch: next-integrity commit d012a7190fc1 ("Linux 5.9-rc2") This series also has a dependency on the following patch series and should be applied in the following order: 1. https://patchwork.kernel.org/patch/11709527/ 2. https://patchwork.kernel.org/patch/11742047/ 3. https://patchwork.kernel.org/patch/11743265/ Change Log v3: - add dm-crypt as a supported data source to measure in ima.h. - Taken dependency on the updated base series v3 (2. above) - Taken dependency on the updated early boot measurement series v2 (3. above). Change Log v2: - Removed the references to "local" measurement from the description - as this series only support remote attestation, and not local integrity enforcement. - Taken dependency on the updated base series (2. above), which introduced a boolean parameter measure_buf_hash as per community feedback to support measuring hash of the buffer, instead of the buffer itself. - Taken dependency on the updated early boot measurement series (3. above). Tushar Sugandhi (2): dm-devel: collect target data and submit to IMA to measure dm-crypt: collect data and submit to DM to measure drivers/md/Makefile | 1 + drivers/md/dm-crypt.c | 171 +++++++++++++++++++ drivers/md/dm-ima.c | 298 +++++++++++++++++++++++++++++++++ include/linux/device-mapper.h | 60 +++++++ security/integrity/ima/Kconfig | 3 +- security/integrity/ima/ima.h | 1 + 6 files changed, 532 insertions(+), 2 deletions(-) create mode 100644 drivers/md/dm-ima.c -- 2.17.1