All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Grubb <sgrubb@redhat.com>
To: linux-audit@redhat.com
Cc: Thomas Liu <tliu@redhat.com>,
	jmorris@namei.org, selinux@tycho.nsa.gov, eparis@parisplace.org
Subject: Re: [PATCH -v3] SELinux: Convert avc_audit to use lsm_audit.h
Date: Fri, 14 Aug 2009 10:57:32 -0400	[thread overview]
Message-ID: <200908141057.33626.sgrubb@redhat.com> (raw)
In-Reply-To: <1250261501.3629.5.camel@moss-pluto.epoch.ncsc.mil>

On Friday 14 August 2009 10:51:41 am Stephen Smalley wrote:
> BTW, it looks to my untrained eye as if dump_common_audit_data() allows
> one to pass a separate target task in the union, in which case we'll get
> two sets of pid= and comm=  data in the same record, one for the subject
> and one for the target/object.  It appears that Smack is already using
> that facility for things like ptrace, kill, etc, whereas SELinux is not.

They should not be doing that. When another process is the object, we have 
specific auxiliary audit records to record this. We have to do this for CAPP so 
MAC systems should not have to do this. See AUDIT_OBJ_PID.

> Two questions:
> 1) Will the multiple pid= comm= entries get handled correctly by auditd
> and the audit tools? Do we need separate names for the target vs source
> pid/comm values?

Yes, we need to record the object information. But we have a record type for 
that already AUDIT_OBJ_PID.

> 2) Should we start using ad.u.tsk in SELinux as well to capture the
> target of a ptrace, kill, wait, ... in the avc audit record?

It should be captured. I thought it was for the LSPP work we did. If for some 
reason its not recorded, then audit_log_pid_context() should be called.

-Steve

WARNING: multiple messages have this Message-ID (diff)
From: Steve Grubb <sgrubb@redhat.com>
To: linux-audit@redhat.com
Cc: Stephen Smalley <sds@tycho.nsa.gov>, Thomas Liu <tliu@redhat.com>,
	eparis@parisplace.org, jmorris@namei.org, selinux@tycho.nsa.gov
Subject: Re: [PATCH -v3] SELinux: Convert avc_audit to use lsm_audit.h
Date: Fri, 14 Aug 2009 10:57:32 -0400	[thread overview]
Message-ID: <200908141057.33626.sgrubb@redhat.com> (raw)
In-Reply-To: <1250261501.3629.5.camel@moss-pluto.epoch.ncsc.mil>

On Friday 14 August 2009 10:51:41 am Stephen Smalley wrote:
> BTW, it looks to my untrained eye as if dump_common_audit_data() allows
> one to pass a separate target task in the union, in which case we'll get
> two sets of pid= and comm=  data in the same record, one for the subject
> and one for the target/object.  It appears that Smack is already using
> that facility for things like ptrace, kill, etc, whereas SELinux is not.

They should not be doing that. When another process is the object, we have 
specific auxiliary audit records to record this. We have to do this for CAPP so 
MAC systems should not have to do this. See AUDIT_OBJ_PID.

> Two questions:
> 1) Will the multiple pid= comm= entries get handled correctly by auditd
> and the audit tools? Do we need separate names for the target vs source
> pid/comm values?

Yes, we need to record the object information. But we have a record type for 
that already AUDIT_OBJ_PID.

> 2) Should we start using ad.u.tsk in SELinux as well to capture the
> target of a ptrace, kill, wait, ... in the avc audit record?

It should be captured. I thought it was for the LSPP work we did. If for some 
reason its not recorded, then audit_log_pid_context() should be called.

-Steve

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

  reply	other threads:[~2009-08-14 14:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-14 16:14 [PATCH -v3] SELinux: Convert avc_audit to use lsm_audit.h Thomas Liu
2009-08-14 14:51 ` Stephen Smalley
2009-08-14 14:51   ` Stephen Smalley
2009-08-14 14:57   ` Steve Grubb [this message]
2009-08-14 14:57     ` Steve Grubb
2009-08-17  0:27   ` James Morris
2009-08-17  0:27     ` James Morris

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=200908141057.33626.sgrubb@redhat.com \
    --to=sgrubb@redhat.com \
    --cc=eparis@parisplace.org \
    --cc=jmorris@namei.org \
    --cc=linux-audit@redhat.com \
    --cc=selinux@tycho.nsa.gov \
    --cc=tliu@redhat.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.