Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp57406ybt; Fri, 12 Jun 2020 19:45:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKgFk3NqxgEkjso+tIJIu+3A/caLHx47HNBO0oWGgBnIwFUTD5e2IXPJC6A/N3F7Xcj3Bb X-Received: by 2002:a17:906:35ca:: with SMTP id p10mr15613707ejb.392.1592016305645; Fri, 12 Jun 2020 19:45:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592016305; cv=none; d=google.com; s=arc-20160816; b=yCTFsMZF5uangAjYwx44LESzM2bB+TJv+Z4cXadflUCyLSubBuTrd/EDE8uSUOQBl/ iaVjNHiPe/BBl/HPAhSCtZITxSow3sjIBIbuTX20CUFlCUiffOgZHs2OJLBw7SJS7kN4 hraifYvEhaaTcxeTp/minR/xvwf0NBX6+Iol+elqmRBmS0LyiBq/+0QY9VyHkpiFJ+Cg VGBbS08o3RpYMtrAHkoa7tIBlaZmD1+hZo48mrjVCSkoQwtKLLdm7cmHogqP70NC+m3m 6n57NB4NlWTG0a8f6rylPlRKnZ22H2rwcX6NDFSj6uwUdxTP4qcga+y1FuNTqHVP3TcF q8Pg== 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 :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=vaFIY848bzauzFCfpzzjSbZuqVCA6KD5jaD7Y2KRWaw=; b=vtC28/S6RiHNItfTxp9icOL6gYAP5j2WHMxpfBIr/0tK3/u+6IO3XfEJ74Koqcm5PD sKJTdFjM7FAIl5jhmGr0wZzKcstqDlTMlW5i2emBeKN7u/q5RIhv094W/3cYtI6Oxrpn CfpFYx3kVrBr2pv43RzcVqyYoKwdQiFcgN/VGQfwt4KDcreTMwM1OPqG2xxH/+5R1tg0 prycKwIYgDkSmQ0eP1/1RES7zbJ8pZZxFh4D3z9y67kDQHZRo7l2bw8bbaVBMKP9wNID w70uQEeELdTdalML3icG1a3tN3R/jqpjU0TqHo/Smlv37sM1kfWdjUevlXWHIA9iQN+p paZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=BAKdp5qO; 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 ca19si4925765edb.341.2020.06.12.19.44.26; Fri, 12 Jun 2020 19:45:05 -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=BAKdp5qO; 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 S1726485AbgFMClk (ORCPT + 99 others); Fri, 12 Jun 2020 22:41:40 -0400 Received: from linux.microsoft.com ([13.77.154.182]:54094 "EHLO linux.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726290AbgFMClg (ORCPT ); Fri, 12 Jun 2020 22:41:36 -0400 Received: from localhost.localdomain (c-73-42-176-67.hsd1.wa.comcast.net [73.42.176.67]) by linux.microsoft.com (Postfix) with ESMTPSA id D7C17205DDA3; Fri, 12 Jun 2020 19:41:35 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com D7C17205DDA3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1592016096; bh=vaFIY848bzauzFCfpzzjSbZuqVCA6KD5jaD7Y2KRWaw=; h=From:To:Cc:Subject:Date:From; b=BAKdp5qOjEIdRsnotGep4dozpflsun+0alY4C689o3x6bOSyty8ObzTOMLaKYa/hF HY+jssMDf0f/1MHeyVHhMJWQ0ItLnNAevC51ndvv/2gn0nZTAAH87nhGrmfbPrpiDm /R2RQR2nvr+P7AQfH/xIT05T1FQ1bJt1DwX/GtxY= From: Lakshmi Ramasubramanian To: zohar@linux.ibm.com, stephen.smalley@gmail.com, casey@schaufler-ca.com Cc: jmorris@namei.org, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/5] LSM: Measure security module state Date: Fri, 12 Jun 2020 19:41:25 -0700 Message-Id: <20200613024130.3356-1-nramas@linux.microsoft.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Critical data structures of security modules are currently not measured. Therefore an attestation service, for instance, would not be able to attest whether security modules are always operating with the policies and configuration that the system administrator had setup. The policies and configuration for the security modules could be tampered with by malware by exploiting Kernel vulnerabilities or modified through some inadvertent actions on the system. Measuring such critical data would enable an attestation service to better assess the state of the system. IMA measures system files, command line arguments passed to kexec, boot aggregate, keys, etc. It can be used to measure critical data structures of security modules as well. This change aims to address measuring critical data structures of security modules when they are initialized, when they are updated at runtime, and also periodically to detect any tampering. This change set is based off of Linux Kernel version 5.8-rc1 Lakshmi Ramasubramanian (5): IMA: Add LSM_STATE func to measure LSM data IMA: Define an IMA hook to measure LSM data LSM: Add security_state function pointer in lsm_info struct LSM: Define SELinux function to measure security state LSM: Define workqueue for measuring security module state Documentation/ABI/testing/ima_policy | 6 +- include/linux/ima.h | 4 ++ include/linux/lsm_hooks.h | 5 ++ security/integrity/ima/ima.h | 1 + security/integrity/ima/ima_api.c | 2 +- security/integrity/ima/ima_main.c | 30 +++++++++ security/integrity/ima/ima_policy.c | 28 +++++++-- security/security.c | 91 +++++++++++++++++++++++++++- security/selinux/hooks.c | 43 +++++++++++++ security/selinux/include/security.h | 2 + security/selinux/selinuxfs.c | 1 + 11 files changed, 205 insertions(+), 8 deletions(-) -- 2.27.0