Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4893124imm; Wed, 30 May 2018 14:17:15 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLzdefW6YZMRKPI3cJ6WRa/+/a6k6LQ5fv4rQai6wSZpkQ1gTXyYBsHVP2thWaAP/AL4m6g X-Received: by 2002:a17:902:c6b:: with SMTP id 98-v6mr4231701pls.37.1527715035061; Wed, 30 May 2018 14:17:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527715035; cv=none; d=google.com; s=arc-20160816; b=0IKxe9otU3j9n4xo2IahdYZ7EMyAL2wzPgQVqhZ8W3HYSRzE+m6dfvrxb+iT8mb+R5 Db+GGKy1T7F5C08HIjq+HcsyyJGqXqJ18+inYlCVaV2AY5hjkC7DWLePckuPkjHMzO5Q WJfPxuJsrSGPntWTA19qdU4PfdahBenMxAa0z+cbh08vMuuM9Uah984FhUV9pNESMYBm fJBbfe59nNgliHp8cPCudMkq3Y1pUj5BVby89D2HRdgBF3TenufnibEAvgexD2oMLYXa iadiOKVvWJDTrgMDJreBJ2EJZRK6GnpVetMGMIbSib6n0f3AuozkhAscSWBbRt6KipXf 7M4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=S1KWxGgugvXQoDIl7GnLyTvDAxX9XzO4R2WV1G5VnKg=; b=hEGus1BsqvN7n75V3a85xhT25x/ZadZy/j52eduW+8EjyfQLBiG5vC5FG2FNXdRDwx FDKDHRhnIJHJEYkvEAQidoM2ub/eBbEpW4q7C6qrZc6/ZXHKicEqm/NvCjcXSzc0l92K BU3++Ohon9b70OVY6WBLo4/zkObtdRG+IWliPp6AakKMZnu1Pl2xUxeMtvqEJQyEBQod qtlrxKCOomXFlPFnMMuN4EsD7dfkOdGT7cyEm0dqkEgfMyrOD5AJc0KHJYkq/1Tox93a 4PgO4R9QHNASQ6l+hyeWQ0HtIazvrCKD8j+cKG1afltAeAZi6ejUmd7cH+rIsFPhYLFC R4vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=upZslhfo; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 4-v6si35444202pfb.204.2018.05.30.14.17.00; Wed, 30 May 2018 14:17:15 -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; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=upZslhfo; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932431AbeE3VQC (ORCPT + 99 others); Wed, 30 May 2018 17:16:02 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:38310 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753484AbeE3VQA (ORCPT ); Wed, 30 May 2018 17:16:00 -0400 Received: by mail-lf0-f68.google.com with SMTP id z142-v6so6472909lff.5 for ; Wed, 30 May 2018 14:15:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=S1KWxGgugvXQoDIl7GnLyTvDAxX9XzO4R2WV1G5VnKg=; b=upZslhfo9zZp6dqS9HcQn6gM9lrbCfA5vYJP8vjY6WCnMMIHIGdw+YLI6w992ekNr2 y63RqVEhMsgO75urnt9Qccw8LGOqXR0MixmMjWMoG7Xc1pFgT4REoTY+5uaBHWoQyoln l5SInZ8hlu0W3tdlVqoiw2Pb+B5lp5NmWtagE8W5+v0Ca8IvM++A/7wfLAXLCWPZXtSA v+jGLujyTxgfb8zBsHP7nCbBQjO1k1tqd3HKH57PhQ4uLjBWGf1Cr9zHYSxOFbaIqYpa +MAMClY/gmwaisHoZ9OUsODTn7l+gVdO/PvOwze/lxGi6eNZ7+xfzLoOLV6zhHfSkOXq 8jgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=S1KWxGgugvXQoDIl7GnLyTvDAxX9XzO4R2WV1G5VnKg=; b=jS65AgnrknRSNwGt79NPlJvAQMYYKnpW3GPFkmPB+8DRLom+EHRvsNbLUCSUZQIhd1 OifXPQfxj2QPab3kyMYS+x94wp1/FT7NE7eRpD2CRwpIBbcelQ0Jf0b1i126XxQo+AUN J/ZmUxPJmbpNmiIv9f8b5dIAStKUuE8a4IJD4/XN+EIbhu5FspRAcCaXRv21SQayBFzV Xb80CqDSfli6RHd7jIrqq1nTJIVwEZc5nI+CMfJKHAjp9aL3MvrGQ46CwgnE9hmkm3s8 s0QjqBG2K6ZqkptVHhmagTziihd0XpmaSQKE/wpQZt6pMYk+/YBBMFiIDUgCQpJ3Lu+Q +UGQ== X-Gm-Message-State: ALKqPwcZl8ykxbWdykvz4RZpa+J+w0al2pwR9Jp1olo6Jo8wfqr8yHcB AuLdDxKZSyXjChmjqJzpMIAS/icEsyGougky5pHF X-Received: by 2002:a2e:18b:: with SMTP id f11-v6mr3261538lji.83.1527714959095; Wed, 30 May 2018 14:15:59 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a19:a911:0:0:0:0:0 with HTTP; Wed, 30 May 2018 14:15:58 -0700 (PDT) X-Originating-IP: [108.20.156.165] In-Reply-To: <1527685480.3534.54.camel@linux.vnet.ibm.com> References: <20180524201105.3179904-1-stefanb@linux.vnet.ibm.com> <20180524201105.3179904-6-stefanb@linux.vnet.ibm.com> <4331521.GQBdaJNAj6@x2> <1527634686.3534.27.camel@linux.vnet.ibm.com> <1527685480.3534.54.camel@linux.vnet.ibm.com> From: Paul Moore Date: Wed, 30 May 2018 17:15:58 -0400 Message-ID: Subject: Re: [PATCH 5/8] integrity: Add exe= and tty= before res= to integrity audits To: Mimi Zohar Cc: Steve Grubb , Stefan Berger , linux-integrity@vger.kernel.org, linux-audit@redhat.com, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 30, 2018 at 9:04 AM, Mimi Zohar wrote: > On Tue, 2018-05-29 at 18:58 -0400, Mimi Zohar wrote: >> On Tue, 2018-05-29 at 17:47 -0400, Paul Moore wrote: >> > On Tue, May 29, 2018 at 5:35 PM, Steve Grubb wrote: >> > > On Tuesday, May 29, 2018 5:19:39 PM EDT Paul Moore wrote: >> > >> On Thu, May 24, 2018 at 4:11 PM, Stefan Berger >> > >> >> > >> wrote: >> > >> > 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); >> > >> >> > >> NACK >> > >> >> > >> Please add the new fields to the end of the audit record, thank you. >> > > >> > > Let's see what an example event looks like before NACK'ing this. Way back in >> > > 2013 the IMA events were good. I think this is repairing the event after some >> > > drift. >> > >> > Can you reference a specific commit, or point in time during 2013? >> > Looking at the git log quickly, if I go back to commit d726d8d719b6 >> > ("integrity: move integrity_audit_msg()") from March 18, 2013 (the >> > commit that created integrity_audit.c) the field ordering appears to >> > be the same as it today. >> > >> > My NACK still stands. >> >> There hasn't been any changes up to now. This patch set refactors >> integrity_audit_msg(), creating integrity_audit_msg_common(), which >> will be called from both ima_audit_measurement() and >> ima_parse_rule(). > > That should have been "from integrity_audit_msg() and > ima_parse_rule()", not ima_audit_measurement(). No worries, the important part is that the record format really hasn't changed from 2013 as far as I can tell. >> Previously the audit record generated by ima_parse_rule() did not >> include this info. The change in this patch will affect both the >> existing and the new INTEGRITY_AUDIT_POLICY_RULE audit records. -- paul moore www.paul-moore.com