Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4687723imm; Fri, 18 May 2018 09:02:35 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoe/nSt8wTiB3wCbdyYJw+PjNnyFI7ewR0WjyMl/sTmy1kXbQaZMqm4Fusbnc0xMptHBZ7n X-Received: by 2002:aa7:81cc:: with SMTP id c12-v6mr10089742pfn.169.1526659355727; Fri, 18 May 2018 09:02:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526659355; cv=none; d=google.com; s=arc-20160816; b=L9T4eQzFs0oA0UIb3bE+F49X6BUSGgs68bDX6LuxjharC14nOXjM/ukt5bRaD/BjOL q/7N0ehQauVplPhqRSevCcCxg3yf67hr3L/mqSMLi2SIzE0WZqKbgHZLCiCQpkdtrtOw 097yMImxz7eHpl0KBa662chRaJiOGH97090RUjoDXtzD2T8q5YMMnjxf1Dgwy4dLZbqP /LRmnZVJO3H/Rf+OC3Gshferz/KxPwvnqOLt9FtdlzOCCgcucRM8PB89AEr1SX8MjeEw fR+V/Fk5PIyhMAd3yoqtszftiZt/fQrm6ovM2yEN7+0LNZB/1+A+Cw/sQDacBygv9CJ2 7LBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=nZhOiQ/uVnzUpGnmC1fcipHTULG9hvyLwZ0CU1D62hE=; b=IYxG4AWEojuvHfIdrsWzXTFOVbziafgBbd/Ueu7oYSIONEVHiT+qOl905LjMCa9F3I zr9Y3GD3htzvSCit69FoV2j3KTDk9ORbeO8BPnf3SLURVwKUALiX8GpXYAnM4Ap1YP1B 68OVRDuoPct1sLIObbYSYIFw9MVyOXrp+ARoTrZFCfO/4eNUU5vA5Bnlch5MfSI5MXFb DNqaKz+BY2+aJhm495vEqBlq5kAcxe0Ti/iCzlgsm3jNP43LlpQxMH/uJEEqAyGfT+Hk Jn0aA5C5QMaqHXzLPYE0TqBOqo49tZsomJWBqrK8ALPoEX7s2yPmf+BK99PVMAyNtsZF gFPg== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i33-v6si7555017pld.546.2018.05.18.09.01.50; Fri, 18 May 2018 09:02:35 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752284AbeERQBH (ORCPT + 99 others); Fri, 18 May 2018 12:01:07 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:50090 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752168AbeERQBD (ORCPT ); Fri, 18 May 2018 12:01:03 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4F3854201AF1; Fri, 18 May 2018 16:01:03 +0000 (UTC) Received: from madcap2.tricolour.ca (ovpn-112-24.rdu2.redhat.com [10.10.112.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 981A02166BAE; Fri, 18 May 2018 16:01:01 +0000 (UTC) Date: Fri, 18 May 2018 12:00:26 -0400 From: Richard Guy Briggs To: Stefan Berger Cc: Mimi Zohar , containers@lists.linux-foundation.org, Linux-Audit Mailing List , linux-integrity , LKML , paul@paul-moore.com, sgrubb@redhat.com Subject: Re: [PATCH] audit: add containerid support for IMA-audit Message-ID: <20180518160026.i5cxkg4eggu2yqpz@madcap2.tricolour.ca> References: <20180305135008.po6lheqnmkqqo6q4@madcap2.tricolour.ca> <1520259854.10396.313.camel@linux.vnet.ibm.com> <20180308112104.z67wohdvjqemy7wy@madcap2.tricolour.ca> <20180517213001.62caslkjwv575xgl@madcap2.tricolour.ca> <86df5c2c-9db3-21b9-b91b-30a4f53f9504@linux.vnet.ibm.com> <1526647996.3632.164.camel@linux.vnet.ibm.com> <1526654395.3632.196.camel@linux.vnet.ibm.com> <1347e0c5-40c9-34a4-9c54-60bd2917b2d7@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1347e0c5-40c9-34a4-9c54-60bd2917b2d7@linux.vnet.ibm.com> User-Agent: NeoMutt/20171027 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 18 May 2018 16:01:03 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 18 May 2018 16:01:03 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'rgb@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-05-18 10:52, Stefan Berger wrote: > On 05/18/2018 10:39 AM, Mimi Zohar wrote: > > On Fri, 2018-05-18 at 09:54 -0400, Stefan Berger wrote: > > > On 05/18/2018 08:53 AM, Mimi Zohar wrote: > > [..] > > > > > > > > > If so, which ones? We could probably refactor the current > > > > > > > integrity_audit_message() and have ima_parse_rule() call into it to get > > > > > > > those fields as well. I suppose adding new fields to it wouldn't be > > > > > > > considered breaking user space? > > > > > > Changing the order of existing fields or inserting fields could break > > > > > > stuff and is strongly discouraged without a good reason, but appending > > > > > > fields is usually the right way to add information. > > > > > > > > > > > > There are exceptions, and in this case, I'd pick the "more standard" of > > > > > > the formats for AUDIT_INTEGRITY_RULE (ima_audit_measurement?) and stick > > > > > > with that, abandoning the other format, renaming the less standard > > > > > > version of the record (ima_parse_rule?) and perhpas adopting that > > > > > > abandonned format for the new record type while using > > > > > > current->audit_context. > > > > This sounds right, other than "type=INTEGRITY_RULE" (1805) for > > > > ima_audit_measurement(). ?Could we rename type=1805 to be > > > So do we want to change both? I thought that what > > > ima_audit_measurement() produces looks ok but may not have a good name > > > for the 'type'. Now in this case I would not want to 'break user space'. > > > The only change I was going to make was to what ima_parse_rule() produces. > > The only change for now is separating the IMA policy rules from the > > IMA-audit messages. > > > > Richard, when the containerid is appended to the IMA-audit messages, > > would we make the audit type name change then? > > > > > > INTEGRITY_AUDIT or INTEGRITY_IMA_AUDIT? ?The new type=1806 audit > > > > message could be named INTEGRITY_RULE or, if that would be confusing, > > > > INTEGRITY_POLICY_RULE. > > > For 1806, as we would use it in ima_parse_rule(), we could change that > > > in your patch to INTEGRITY_POLICY_RULE. IMA_POLICY_RULE may be better > > > for IMA to produce but that's inconsistent then. > > Ok > > One other question is whether IMA's audit calls should all adhere to > CONFIG_INTEGRITY_AUDIT. If I understand your question correctly, then no, since each one is a different type of record, hence the half dozen IMA record types: #define AUDIT_INTEGRITY_DATA 1800 /* Data integrity verification */ #define AUDIT_INTEGRITY_METADATA 1801 /* Metadata integrity verification */ #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 */ > Most do but those two that currently use > AUDIT_INTEGRITY_RULE do not. Should that be changed as well? As far as I can tell, all the other IMA audit record types are fine. > ??? Stefan - RGB -- Richard Guy Briggs Sr. S/W Engineer, Kernel Security, Base Operating Systems Remote, Ottawa, Red Hat Canada IRC: rgb, SunRaycer Voice: +1.647.777.2635, Internal: (81) 32635