Received: by 10.223.185.116 with SMTP id b49csp2633108wrg; Mon, 5 Mar 2018 06:20:10 -0800 (PST) X-Google-Smtp-Source: AG47ELvNen16oDxAPs6lmEJ/0Np8tn6eNSj5QXJtNfy3cnug+6/HwCHfRWH6GOlv/19ibyijdyP4 X-Received: by 10.99.126.19 with SMTP id z19mr12280345pgc.108.1520259610153; Mon, 05 Mar 2018 06:20:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520259610; cv=none; d=google.com; s=arc-20160816; b=AyxdIDF01ZluocPRJbzMeva4xuCZZoyLJvwTiolf54J8THGviVeFbK95Fn3q4dGlZ0 SP8zT08anMudcvuG6BQ7Nlr21Q0P1BDa8+u/T5zcWclinTFI1Sv4e+QQ4xqv2T12nUdp MVN9AxJ9//RT1r+2EJWTpWw9vLnKJOwYAt4weEjUL23HyCnpvG7pniKCgTBCf7uKfJS4 ppWmrXyHNtIdPMppIuyOCjdKFWi2uyqDeymQ1Nke9myn/vHLefL2aIoUTtXM8V+ichn5 7BWqYqfGyDM7BUNUaCKa9CsnZWerzZGwSoUwLv+9XXIj+50LVYdUZovZI75U/di3+MC9 yITw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :mime-version:date:cc:to:from:subject:arc-authentication-results; bh=Z4abZ/68HEelb9A7tilRGforwUbmshN9fEm1HwF3sas=; b=o97h3ncqM3buiVPHkyHmXTkS9lMn11MN9HlqULaAyIhjaymos2Of/2/rnNfZpaBIDb uLYSvgDTkUBIC2mdj3EsFC9fO5rBNd3A8ZKZQmMjqrk32rCx4D9BuAMybR1MqOOODaW7 9TYLtol7Ff3hTga1KV0vO0OG4MotwUAFMRkMszW1L5G2tjKzcvgAFnA/4+FE/s44wLAB OE2J2Vedvr1K9Y4BeMzX2/BCAeddeVLgCK7Ye/P3KxXxsGNDTa9HDtyENui6B18gjHwC r8WcaYx6DBiCjcHr8QX402u9/mOwkuTs2aEaTXVjrYkwtNZsFwHrNHKqef2qXghj8oin xAVw== 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 e10si93361pgu.428.2018.03.05.06.19.55; Mon, 05 Mar 2018 06:20:10 -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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933319AbeCENnW (ORCPT + 99 others); Mon, 5 Mar 2018 08:43:22 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:53378 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932837AbeCENnV (ORCPT ); Mon, 5 Mar 2018 08:43:21 -0500 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w25Dda2c124734 for ; Mon, 5 Mar 2018 08:43:21 -0500 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0a-001b2d01.pphosted.com with ESMTP id 2gh620jqpk-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Mon, 05 Mar 2018 08:43:20 -0500 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 5 Mar 2018 13:43:17 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 5 Mar 2018 13:43:14 -0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w25DhERf262470; Mon, 5 Mar 2018 13:43:14 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 401C752045; Mon, 5 Mar 2018 12:34:54 +0000 (GMT) Received: from localhost.localdomain (unknown [9.80.81.235]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 81C6E52041; Mon, 5 Mar 2018 12:34:53 +0000 (GMT) Subject: [PATCH] audit: add containerid support for IMA-audit From: Mimi Zohar To: Richard Guy Briggs Cc: containers@lists.linux-foundation.org, Linux-Audit Mailing List , linux-integrity , LKML Date: Mon, 05 Mar 2018 08:43:13 -0500 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.5 (3.20.5-1.fc24) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 18030513-0020-0000-0000-000003FED1CA X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18030513-0021-0000-0000-000042930B3B Message-Id: <1520257393.10396.291.camel@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-05_05:,, 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-1803050165 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Richard, This patch has been compiled, but not runtime tested. --- 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