Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp877131imm; Fri, 11 May 2018 07:44:11 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqTrYhmUsyUnSKYQLYLm1G6JcBGoXb6NY4isvNBo8MFjLsAGuzMvm5uZaH+OWm2PqKuUGZG X-Received: by 2002:a17:902:5382:: with SMTP id c2-v6mr5808362pli.335.1526049851107; Fri, 11 May 2018 07:44:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526049851; cv=none; d=google.com; s=arc-20160816; b=TZ1HiW87URaCpvcYboZ+iT0Djm1eRJlw8iiNpymro7Y0x/+kYTWbegHgZR7gb8OSOJ sWtdL5vj5hMc+j4hVtWaFq98VtqupQyka/o+IpZ1Db9nKPUf8CyU66FGNWlzn9mOfNaK xoQt4O779ljcW/M3meiyvxGiT2jgzmtjaYs4NShnocjqXIuGIfudpQo/ok3aKod67Elw Q4OKZIHtob5rKBGxHpRa0wHsj0YqsT84sOR38aQ4Onkq9nddCbQReVRBBlw+HBw1dQGW ZGXuWVYxPk4/F0VU0kNDiSRbD0fxGfwVnQqL6XghbdeQQeTm+LpFJb53hsTZkaIeBWiE QTdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from:arc-authentication-results; bh=vN7rZccOC+ul88Ppb6BHewSCjSoQC061O8XhV+wQoNg=; b=I4JKwo/6IadI4LGNv3zJCQKjuok6i3mT+UkwHnYdtRumlOcLBwabgXTxfUejejEGk3 RKdNkHQQ1uOTMBc2Pcb0nagtxhgSNAtuel41nAloKTwBK/B42Snyhx4qZeAOscaAAvg5 yegeYb2TumfpGKMHBBG0TdbAt/w7HW91AmYunio4f6U+hfENHoNpwNn+pFxlUcgnBfp1 /lxsuYTEfIDrFQ1Cm8BhaVhnOXHEJPJl/1MfG02ZBG/APqn5u1tyhNHsJpFIOap+C0zQ zBI+mRIvfq2vtWxbdCA71cC0PYw/HkALmoeLxDP6FVeLoZbRyp63FSiBXM87DC76I/hn JcBA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b7-v6si2852247pge.228.2018.05.11.07.43.56; Fri, 11 May 2018 07:44:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753280AbeEKOn1 (ORCPT + 99 others); Fri, 11 May 2018 10:43:27 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:42794 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753104AbeEKOmp (ORCPT ); Fri, 11 May 2018 10:42:45 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w4BEe6NC044817 for ; Fri, 11 May 2018 10:42:45 -0400 Received: from e36.co.us.ibm.com (e36.co.us.ibm.com [32.97.110.154]) by mx0a-001b2d01.pphosted.com with ESMTP id 2hwcgmsycy-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 11 May 2018 10:42:45 -0400 Received: from localhost by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 11 May 2018 08:42:44 -0600 Received: from b03cxnp08025.gho.boulder.ibm.com (9.17.130.17) by e36.co.us.ibm.com (192.168.1.136) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 11 May 2018 08:42:40 -0600 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w4BEgeUf21365134; Fri, 11 May 2018 07:42:40 -0700 Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 60A6F7803F; Fri, 11 May 2018 08:42:40 -0600 (MDT) Received: from sbct-3.pok.ibm.com (unknown [9.47.158.153]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP id 9D34478037; Fri, 11 May 2018 08:42:39 -0600 (MDT) From: Stefan Berger To: linux-integrity@vger.kernel.org, containers@lists.linux-foundation.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org Cc: serge@hallyn.com, sunyuqiong1988@gmail.com, david.safford@ge.com, mkayaalp@cs.binghamton.edu, James.Bottomley@HansenPartnership.com, zohar@linux.vnet.ibm.com, ebiederm@xmission.com, john.johansen@canonical.com Subject: [RFC PATCH v4 3/5] ima: differentiate auditing policy rules from "audit" actions Date: Fri, 11 May 2018 10:42:28 -0400 X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180511144230.75384-1-stefanb@linux.vnet.ibm.com> References: <20180511144230.75384-1-stefanb@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18051114-0020-0000-0000-00000DE8F69A X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009006; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000260; SDB=6.01030766; UDB=6.00526815; IPR=6.00809898; MB=3.00021049; MTD=3.00000008; XFM=3.00000015; UTC=2018-05-11 14:42:43 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18051114-0021-0000-0000-00006152A07E Message-Id: <20180511144230.75384-4-stefanb@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-11_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805110139 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mimi Zohar The AUDIT_INTEGRITY_RULE is used for auditing IMA policy rules and the IMA "audit" policy action. This patch defines AUDIT_INTEGRITY_POLICY to reflect the IMA policy rules. Signed-off-by: Mimi Zohar --- include/uapi/linux/audit.h | 3 ++- security/integrity/ima/ima_policy.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h index 4e61a9e05132..8966e7ff1c4c 100644 --- a/include/uapi/linux/audit.h +++ b/include/uapi/linux/audit.h @@ -146,7 +146,8 @@ #define AUDIT_INTEGRITY_STATUS 1802 /* Integrity enable status */ #define AUDIT_INTEGRITY_HASH 1803 /* Integrity HASH type */ #define AUDIT_INTEGRITY_PCR 1804 /* PCR invalidation msgs */ -#define AUDIT_INTEGRITY_RULE 1805 /* policy rule */ +#define AUDIT_INTEGRITY_RULE 1805 /* IMA "audit" action policy msgs */ +#define AUDIT_INTEGRITY_POLICY 1806 /* IMA policy rules */ #define AUDIT_KERNEL 2000 /* Asynchronous audit record. NOT A REQUEST. */ diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c index 915f5572c6ff..3a1412db02a3 100644 --- a/security/integrity/ima/ima_policy.c +++ b/security/integrity/ima/ima_policy.c @@ -619,7 +619,7 @@ static int ima_parse_rule(char *rule, struct ima_rule_entry *entry) bool uid_token; int result = 0; - ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_INTEGRITY_RULE); + ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_INTEGRITY_POLICY); entry->uid = INVALID_UID; entry->fowner = INVALID_UID; -- 2.14.3