Linux-audit Archive on lore.kernel.org
 help / color / Atom feed
From: Steve Grubb <sgrubb@redhat.com>
To: Lakshmi Ramasubramanian <nramas@linux.microsoft.com>
Cc: rgb@redhat.com, linux-kernel@vger.kernel.org,
	Mimi Zohar <zohar@linux.ibm.com>,
	linux-audit@redhat.com, linux-integrity@vger.kernel.org
Subject: Re: [PATCH 1/2] integrity: Add errno field in audit message
Date: Mon, 15 Jun 2020 18:23:31 -0400
Message-ID: <8800031.dr63W5FlUW@x2> (raw)
In-Reply-To: <42482562-d74c-2678-069f-1d8ef4feffac@linux.microsoft.com>

On Friday, June 12, 2020 3:50:14 PM EDT Lakshmi Ramasubramanian wrote:
> On 6/12/20 12:25 PM, Mimi Zohar wrote:
> > The idea is a good idea, but you're assuming that "result" is always
> > errno.  That was probably true originally, but isn't now.  For
> > example, ima_appraise_measurement() calls xattr_verify(), which
> > compares the security.ima hash with the calculated file hash.  On
> > failure, it returns the result of memcmp().  Each and every code path
> > will need to be checked.
> 
> Good catch Mimi.
> 
> Instead of "errno" should we just use "result" and log the value given
> in the result parameter?

That would likely collide with another field of the same name which is the 
operation's results. If it really is errno, the name is fine. It's generic 
enough that it can be reused on other events if that mattered.


>  From the audit field dictionary (link given below) "result" is already
> a known field that is used to indicate the result of the audited operation.
> 
> @Steve\Paul:
> Like "res" is "result" also expected to have only values "0" or "1", or
> can it be any result code?

It should only be 0 or 1. Sometime in the past it may have been the words 
success/fail. But we've been converting those as we find them.

-Steve

> https://github.com/linux-audit/audit-documentation/blob/master/specs/fields
> /field-dictionary.csv
> 
> res 	alphanumeric 	result of the audited operation(success/fail)
> 
> result 	alphanumeric 	result of the audited operation(success/fail)




--
Linux-audit mailing list
Linux-audit@redhat.com
https://www.redhat.com/mailman/listinfo/linux-audit


  reply index

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-11  0:03 Lakshmi Ramasubramanian
2020-06-11  0:04 ` [PATCH 2/2] IMA: Add audit log for failure conditions Lakshmi Ramasubramanian
2020-06-12 20:23   ` Mimi Zohar
2020-06-11  1:45 ` [PATCH 1/2] integrity: Add errno field in audit message Paul Moore
2020-06-11  1:58   ` Lakshmi Ramasubramanian
2020-06-11  2:19     ` Paul Moore
2020-06-12 19:25 ` Mimi Zohar
2020-06-12 19:50   ` Lakshmi Ramasubramanian
2020-06-15 22:23     ` Steve Grubb [this message]
2020-06-15 22:58       ` Paul Moore
2020-06-16 15:29         ` Steve Grubb
2020-06-16 15:43           ` Lakshmi Ramasubramanian
2020-06-16 15:55             ` Steve Grubb
2020-06-16 19:53               ` Mimi Zohar
2020-06-16 20:28                 ` Steve Grubb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8800031.dr63W5FlUW@x2 \
    --to=sgrubb@redhat.com \
    --cc=linux-audit@redhat.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nramas@linux.microsoft.com \
    --cc=rgb@redhat.com \
    --cc=zohar@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-audit Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-audit/0 linux-audit/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-audit linux-audit/ https://lore.kernel.org/linux-audit \
		linux-audit@redhat.com
	public-inbox-index linux-audit

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/com.redhat.linux-audit


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git