Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2430220pxb; Sat, 30 Jan 2021 02:20:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJwglKfgqNRgK7+ke9IgHC+AxxE9Jdt8fVpUD9NVQnvArNUpcuFuDLNG+ALew4fTssR1w955 X-Received: by 2002:a05:6402:184b:: with SMTP id v11mr9498757edy.47.1612002011275; Sat, 30 Jan 2021 02:20:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612002011; cv=none; d=google.com; s=arc-20160816; b=R5Pmf8a1eaSEXZoVXVb1KfQzTfkhA7JQJevkUr1LzuI8LTH2LT3K9VkYy4QzBw9Ltg 5decoZ8VrCPAIQ5kFm3RoWIB4/v5/L74b2/iYiavmc25HkpAcxtA5A+1whQ1dKCneYXr tuXPGw/MVBtKj0xqohICRUGsBNCSYnuW8Zpx44kiqa0zYE29ekCs/C8/5V/9bRi2hAm0 jq792Ce8INnaDBysprJaLWJ/tCpuqkUplhuX2Js6BAUW0d53g3TdZYuaT+crGYaTe/zB IOejE66mOsVUq1mn5Fg2XaqONA133hO4yLldWH9lY30CFDeDXu1MNb1wiZFAooRnFFXW 0J3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=op5LjItHRUfPUox9OsELY1x2Al+yZ2A++LNqhTcTBoc=; b=mv3iv5FpHC0xsyBpWvMbrfqdiRyLU5RJM5jYfs7GlBnjvmlvoRuE0XmSci355qCwyd ZEDUD2S9TlljUUN/MUg63de1MtFdhosOF1Wk90glINNJM4BIM674O2I0GepAHMjUDMe1 SHEiHd9jGR5alKSaX0mLoPWharij/CMq4E5bf+1UsFGkfMWfO9ZDkIhmot4GE8GAWVgM ZPhmnzM0yX/SHdecRH+/aF3gwvKALbRgLlPh+8/xxoelVigq6+27EOWe552JH/tbVGoE ftSa7K7lpZSKqoVrLXr/SyoelfoFYbaFWZG9lub2z0Vzq/JSNMh4Ex0LpA5c23ZTrq5W DncA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b="RUWvjxV/"; 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 s18si773291ejz.40.2021.01.30.02.19.47; Sat, 30 Jan 2021 02:20:11 -0800 (PST) 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="RUWvjxV/"; 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 S231859AbhA3KSc (ORCPT + 99 others); Sat, 30 Jan 2021 05:18:32 -0500 Received: from linux.microsoft.com ([13.77.154.182]:58276 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232160AbhA3Arn (ORCPT ); Fri, 29 Jan 2021 19:47:43 -0500 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 6CA4C20B7192; Fri, 29 Jan 2021 16:45:27 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 6CA4C20B7192 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1611967528; bh=op5LjItHRUfPUox9OsELY1x2Al+yZ2A++LNqhTcTBoc=; h=From:To:Cc:Subject:Date:From; b=RUWvjxV/i144TnYQuhCikj+0Zvb0VvhCZH7VRCa3SNsiSUKEdSjHBqZhL7P2uPx3s 9EQGRRkcsFRISQHBEqkeA+8z27MYnqfgHmo1pP+gEgZ6M54hS9YpZViTP4ZTLUn/fZ nit3Ee+z+fu76B3ifaGmmRhBnBJ4wXx8Ldyobppg= From: Tushar Sugandhi To: zohar@linux.ibm.com, stephen.smalley.work@gmail.com, casey@schaufler-ca.com, agk@redhat.com, snitzer@redhat.com, gmazyland@gmail.com, paul@paul-moore.com Cc: tyhicks@linux.microsoft.com, sashal@kernel.org, jmorris@namei.org, nramas@linux.microsoft.com, linux-integrity@vger.kernel.org, selinux@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, dm-devel@redhat.com Subject: [PATCH 0/3] support for duplicate measurement of integrity critical data Date: Fri, 29 Jan 2021 16:45:16 -0800 Message-Id: <20210130004519.25106-1-tusharsu@linux.microsoft.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org IMA does not measure duplicate buffer data since TPM extend is a very expensive operation. However, in some cases for integrity critical data, the measurement of duplicate data is necessary to accurately determine the current state of the system. Eg, SELinux state changing from 'audit', to 'enforcing', and back to 'audit' again. In this example, currently, IMA will not measure the last state change to 'audit'. This limits the ability of attestation services to accurately determine the current state of the integrity critical data on the system. This series addresses this gap by providing the ability to measure duplicate entries for integrity critical data, driven by policy. This series is based on the following repo/branch/commit: repo: https://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity.git branch: next-integrity-testing commit b3f82afc1041 ("IMA: Measure kernel version in early boot") Tushar Sugandhi (3): IMA: add policy condition to measure duplicate critical data IMA: update functions to read allow_dup policy condition IMA: add support to measure duplicate buffer for critical data hook Documentation/ABI/testing/ima_policy | 4 +++- security/integrity/ima/ima.h | 8 +++---- security/integrity/ima/ima_api.c | 15 +++++++------ security/integrity/ima/ima_appraise.c | 2 +- security/integrity/ima/ima_init.c | 2 +- security/integrity/ima/ima_main.c | 9 ++++---- security/integrity/ima/ima_policy.c | 31 ++++++++++++++++++++++++--- security/integrity/ima/ima_queue.c | 5 +++-- 8 files changed, 54 insertions(+), 22 deletions(-) -- 2.17.1