Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp753240pxa; Wed, 12 Aug 2020 12:32:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKz8F4XFiM7h6Hpl4R2jErmqJ6ibWaY8RxyHpS8xwYZRY7CMK5dMlYJT4qigNcYUzOHpJk X-Received: by 2002:a17:906:c108:: with SMTP id do8mr1459520ejc.88.1597260734874; Wed, 12 Aug 2020 12:32:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597260734; cv=none; d=google.com; s=arc-20160816; b=W1WaZBW8/WOr5wymde8uBGkgYCYJZ2t50RbNBEuUfiqYxK8AdWpQhxAIFkGRns0CsV kGz7KqVhJZn9SPP7JXdUpCkyKKWWCPYGhBXdB8JYzVThacCAJEo20gobmSJKsyTOk4Fu JtyMKsmCTzznjgz5XxgffOeB0vgkuypjHPQQ5M/eMdE2DNWQj6oCkGO88lShqqkl/daK qBsDkH8GxvYsjXiv6jS1rDK2Iz2m2ob8uJO1B6H2OU3TbRWNQluqS3dAXzjk6tBar09E D2OLR/Z3et+sEKWHCseOio9Ls2pHB6Z2Dki0WGWFrwJBPZQXjXmLTVS3I7VCr9WRBmu0 lGpw== 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=KE/92PDDZwu4+k6LDHiyjL8+Ar+TjmWoK4GzA/T5QF4=; b=POGdKTAq1y7C2ps7C7720wwzEYWRGLk8NHUEO4oMQIBkMjP6CFzz/ecCxHRjzT5F+K /xV6pton+30ZZGZ6JqHeWCzftQotRebglMDGhaFwIeLllp4dCZVztY27rG7irMoys4YQ IfYR08i0EV6xPHtLYoIw1ICGkPK9AmH7OBgmrTR1ga9lFtB1CpI/WYsMKi6IJXUAcgoB LLItWnVJb4i9/B0qwz+/7PFzTQJEnTTnwAmx+4EAfTZdn8xaplnMh3ItEH72+MpJ74qk pB6ddHY6ZCZic/XEJG3MVmoUem105YpvU6h0dBr4qdpGK9ZJHVLZ8sKZpN/kjWN0tl6o eMdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b="KJj/pX9x"; 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 e17si1632392ejx.78.2020.08.12.12.31.51; Wed, 12 Aug 2020 12:32:14 -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="KJj/pX9x"; 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 S1726735AbgHLTbP (ORCPT + 99 others); Wed, 12 Aug 2020 15:31:15 -0400 Received: from linux.microsoft.com ([13.77.154.182]:51134 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726526AbgHLTbM (ORCPT ); Wed, 12 Aug 2020 15:31: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 32A8220B4908; Wed, 12 Aug 2020 12:31:11 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 32A8220B4908 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1597260671; bh=KE/92PDDZwu4+k6LDHiyjL8+Ar+TjmWoK4GzA/T5QF4=; h=From:To:Cc:Subject:Date:From; b=KJj/pX9xq2FHGRlMhOZ/5SreGEMcU7inXjdZ+rK/e3Ix8aGEt12tiW+8q/acQ1hkr nCpQ6OlP5R63mkdpdllHunhLW+5//8fh2v0qxHadb/O1gNh/vvFMe3atTe6+gm6FP+ G0qI25BTsW7+G+NBRtWg/wSG4HiFEmI/GnSl0fz0= From: Tushar Sugandhi To: zohar@linux.ibm.com, stephen.smalley.work@gmail.com, casey@schaufler-ca.com, gmazyland@gmail.com Cc: tyhicks@linux.microsoft.com, sashal@kernel.org, jmorris@namei.org, linux-integrity@vger.kernel.org, selinux@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, dm-devel@redhat.com, nramas@linux.microsoft.com Subject: [PATCH 0/3] IMA: Infrastructure for measurement of critical kernel data Date: Wed, 12 Aug 2020 12:30:59 -0700 Message-Id: <20200812193102.18636-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 kernel components that contain critical data which if accidentally or maliciously altered, can compromise the security of the kernel. Example of such components would include LSMs like SELinux, or AppArmor; or device-mapper targets like dm-crypt, dm-verity etc. Many of these components do not use the capabilities provided by kernel integrity subsystem (IMA), and thus they don't use the benefits of extended TPM PCR quotes and ultimately the benefits of remote attestation. This series bridges this gap, so that potential kernel components that contain data critical to the security of the kernel could take advantage of IMA's measuring and quoting abilities - thus ultimately enabling remote attestation for their specific data. System administrators may want to pick and choose which kernel components they would want to enable for measurements, quoting, and remote attestation. To enable that, a new IMA policy is introduced. And lastly, the functionality is exposed through a function ima_measure_critical_data(). The functionality is generic enough to measure the data of any kernel component at runtime. 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 This series also has a dependency on the following patch series: https://patchwork.kernel.org/patch/11709527/ Tushar Sugandhi (3): IMA: generalize keyring specific measurement constructs IMA: add policy to support measuring critical data from kernel components IMA: define IMA hook to measure critical data from kernel components Documentation/ABI/testing/ima_policy | 6 +- include/linux/ima.h | 9 ++ security/integrity/ima/ima.h | 12 +-- security/integrity/ima/ima_api.c | 8 +- security/integrity/ima/ima_main.c | 46 +++++++--- security/integrity/ima/ima_policy.c | 120 ++++++++++++++++++++------- 6 files changed, 147 insertions(+), 54 deletions(-) -- 2.17.1