Received: by 10.223.185.116 with SMTP id b49csp2634488wrg; Mon, 5 Mar 2018 06:21:30 -0800 (PST) X-Google-Smtp-Source: AG47ELvIFj2vijarkXTpmTGPAGWclMtTQBJ0AdDL4UYVEE0xfiQSSYThJsMroLt1qNahGzx6LaY2 X-Received: by 2002:a17:902:309:: with SMTP id 9-v6mr13111817pld.63.1520259690366; Mon, 05 Mar 2018 06:21:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520259690; cv=none; d=google.com; s=arc-20160816; b=UInGL96kwapu91igWjybic4hdNLD4rc0oqsenG4eof09wecu5FtkEIaZYSRPIVLdH5 0+Vvgf7z+dkwzLDI26MPwWm192q4zGM7EZA6w5K9P9DAo1ZVPmUtRhC1RkSaDiftEq3r acPRuhlhcodgG0/Dc/xjTVaIJjj5Fgq3eR+c5IrrbsyBxT3IjOg31mLfwBM+1hkLP2AD Nml+zSeZ6kseltMYLzMFegPXSusqn8+u3G7az8Z8IhqHErUb13WucznKgk9KnCo+SVp4 ke7NLgaRXZyVX8dxcZaNMmMzDfOd0bqsTp1UbbE16kxCxdDrxPSaC4EtAOHdxr8HRRNY h3XA== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=fl6SZQMkOXkwqm07dcxtVh0sHrhi8Xqm+gyVo7XLbFw=; b=kVL5CylFAtnX/iUmOlRoKgAlXiPkHwr6kvW09GrMjGXN28LbYH6lMWUrd1XmBUpbZw tELC1w+K+NwKIBYKylDLxt+17nwYCdF2B2O2hH1VcurMz9tI5M7Ur1gLiNsNx14FQwM2 21TEEMZD+y5BQlEiBnrAlgh6iexsrcEVBvIvhTloRAzZKo7c5zSTeIvp1zmD3RYXFRor Eh+Te7RgvEdBo3cJWCe6syxnIcL/sD0RX4i9jxtTGUQPWmQwy1H2VdWqI1UJ33aEFkZK zqswo5JuayqNHdyb4n/fD0ocYwKH3vlYEkc2ibbwE78MeNtCCs01BQvYMWYW3wf9Tkx1 r/lQ== 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 x18si10120933pfm.270.2018.03.05.06.21.13; Mon, 05 Mar 2018 06:21:30 -0800 (PST) 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 S934425AbeCENyi (ORCPT + 99 others); Mon, 5 Mar 2018 08:54:38 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:34586 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933628AbeCENyg (ORCPT ); Mon, 5 Mar 2018 08:54:36 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 07B434078073; Mon, 5 Mar 2018 13:54:35 +0000 (UTC) Received: from madcap2.tricolour.ca (ovpn-112-12.rdu2.redhat.com [10.10.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B0249202660C; Mon, 5 Mar 2018 13:54:33 +0000 (UTC) Date: Mon, 5 Mar 2018 08:50:08 -0500 From: Richard Guy Briggs To: Mimi Zohar Cc: containers@lists.linux-foundation.org, Linux-Audit Mailing List , linux-integrity , LKML Subject: Re: [PATCH] audit: add containerid support for IMA-audit Message-ID: <20180305135008.po6lheqnmkqqo6q4@madcap2.tricolour.ca> References: <1520257393.10396.291.camel@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1520257393.10396.291.camel@linux.vnet.ibm.com> User-Agent: NeoMutt/20171027 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Mon, 05 Mar 2018 13:54:35 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Mon, 05 Mar 2018 13:54:35 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.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-03-05 08:43, Mimi Zohar wrote: > Hi Richard, > > This patch has been compiled, but not runtime tested. Ok, great, thank you. I assume you are offering this patch to be included in this patchset? I'll have a look to see where it fits in the IMA record. It might be better if it were an AUDIT_CONTAINER_INFO auxiliary record, but I'll have a look at the circumstances of the event. Can you suggest a procedure to test it? > --- > > If the containerid is defined, include it in the IMA-audit record. > > Signed-off-by: Mimi Zohar > --- > security/integrity/ima/ima_api.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/security/integrity/ima/ima_api.c b/security/integrity/ima/ima_api.c > index 33b4458cdbef..41d29a06f28f 100644 > --- a/security/integrity/ima/ima_api.c > +++ b/security/integrity/ima/ima_api.c > @@ -335,6 +335,9 @@ void ima_audit_measurement(struct integrity_iint_cache *iint, > audit_log_untrustedstring(ab, algo_hash); > > audit_log_task_info(ab, current); > + if (audit_containerid_set(current)) > + audit_log_format(ab, " contid=%llu", > + audit_get_containerid(current)); > audit_log_end(ab); > > iint->flags |= IMA_AUDITED; > -- > 2.7.5 > - 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