Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2949273imm; Thu, 24 May 2018 19:42:42 -0700 (PDT) X-Google-Smtp-Source: AB8JxZomvYzc3aIFHuEChCx55aIBT3rSZc0KlHtqktsm/vbqRm6NYQRQqIeQUuF83M4RwdZxBpKr X-Received: by 2002:a63:7c0b:: with SMTP id x11-v6mr466556pgc.384.1527216162742; Thu, 24 May 2018 19:42:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527216162; cv=none; d=google.com; s=arc-20160816; b=frH8c6DBKeim8HkQ19cJA6rZch5gEBVYptDCvKc4gyR86SkGp11GQH/7KJ2KjF/jU6 1fSZ4139KgHpBNx1Kf/u1CCc/+CGKb3D2s2aP3EHcHeycl/T94ScmI1OrbOWWKXWjQmr SLZc0r7Do0gLeMbSMA9wsUc1He0XW8dhtyX9n1HtAXCn4DZ74ZGAun/RGXECFYwBatZr 9ZpFDrn5zUKAWgA2w0dyvcYc2TQaz/pCYPDc3uEB5KEFlU291WOVpqokgdg3igqrK7tF rEKZ9o0eQ1lUrcc2/bSMpOgVS1nqA46qT2BUlZDCgyrMcYIwxJdISXvi3eoIdKgPsW83 Whyg== 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=bu2bOPshame5uZdiNHmD8+GmemfLXJxK5id9tUhsoP8=; b=sSO0AfW9l1wWFIYq5tmPoRkE33OqacCIDZKr7ln4qx6SAJa/hDKHt5VkoUf0H+iO+X 1BYzPGHjYSl2VtwMuCpk+Nsaca0whaaKrXdWukgr2hGr7LdoxRjJIpFTpzfBsvnwU2eN /rvkJUNM3xrawcYVrdVie8Kb5BCgm5P6Px8KD5Ng7tPNVNyIcSARtZ8hJVYm7T1gY8Mw ZMe48UeC82vIOc4S+xCGTEQLR5vjVhJ7ZGU8wDcAnN+W4s6fu+orHU8QDONFwqBqAfCu aVhyBieY9+WFSxXcNG01RtC8uairP1Wb2SX2dRaLQdtPFJ7SJcvweCnzviCeOUHowKYt DEmA== 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 h7-v6si17764079pgc.14.2018.05.24.19.42.28; Thu, 24 May 2018 19:42:42 -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 S971386AbeEXUMk (ORCPT + 99 others); Thu, 24 May 2018 16:12:40 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:40416 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968775AbeEXULR (ORCPT ); Thu, 24 May 2018 16:11:17 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w4OK5xau102622 for ; Thu, 24 May 2018 16:11:16 -0400 Received: from e17.ny.us.ibm.com (e17.ny.us.ibm.com [129.33.205.207]) by mx0a-001b2d01.pphosted.com with ESMTP id 2j63ruh0t8-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 24 May 2018 16:11:15 -0400 Received: from localhost by e17.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 24 May 2018 16:11:14 -0400 Received: from b01cxnp23033.gho.pok.ibm.com (9.57.198.28) by e17.ny.us.ibm.com (146.89.104.204) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 24 May 2018 16:11:12 -0400 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w4OKBBVr16843204; Thu, 24 May 2018 20:11:11 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CE1C7AC0E3; Thu, 24 May 2018 16:12:40 -0400 (EDT) Received: from sbct-3.pok.ibm.com (unknown [9.47.158.153]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP id B820DAC0E6; Thu, 24 May 2018 16:12:40 -0400 (EDT) From: Stefan Berger To: zohar@linux.vnet.ibm.com, sgrubb@redhat.com Cc: linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, linux-audit@redhat.com, Stefan Berger Subject: [PATCH 5/8] integrity: Add exe= and tty= before res= to integrity audits Date: Thu, 24 May 2018 16:11:02 -0400 X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180524201105.3179904-1-stefanb@linux.vnet.ibm.com> References: <20180524201105.3179904-1-stefanb@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18052420-0040-0000-0000-000004317D49 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009065; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000261; SDB=6.01036001; UDB=6.00529949; IPR=6.00815130; MB=3.00021234; MTD=3.00000008; XFM=3.00000015; UTC=2018-05-24 20:11:13 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18052420-0041-0000-0000-000008379AE7 Message-Id: <20180524201105.3179904-6-stefanb@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-24_07:,, 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-1805240228 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the new public audit functions to add the exe= and tty= parts to the integrity audit records. We place them before res=. Signed-off-by: Stefan Berger Suggested-by: Steve Grubb --- security/integrity/integrity_audit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/security/integrity/integrity_audit.c b/security/integrity/integrity_audit.c index db30763d5525..8d25d3c4dcca 100644 --- a/security/integrity/integrity_audit.c +++ b/security/integrity/integrity_audit.c @@ -56,6 +56,8 @@ void integrity_audit_msg(int audit_msgno, struct inode *inode, audit_log_untrustedstring(ab, inode->i_sb->s_id); audit_log_format(ab, " ino=%lu", inode->i_ino); } + audit_log_d_path_exe(ab, current->mm); + audit_log_tty(ab, current); audit_log_format(ab, " res=%d", !result); audit_log_end(ab); } -- 2.13.6