All of lore.kernel.org
 help / color / mirror / Atom feed
From: Casey Schaufler <casey@schaufler-ca.com>
To: "Serge E. Hallyn" <serue@us.ibm.com>
Cc: Eric Paris <eparis@redhat.com>,
	selinux@tycho.nsa.gov, linux-fsdevel@vger.kernel.org,
	linux-security-module@vger.kernel.org, viro@ZenIV.linux.org.uk,
	sds@tycho.nsa.gov
Subject: Re: SELinux and access(2), we want to know.
Date: Thu, 07 May 2009 20:51:29 -0700	[thread overview]
Message-ID: <4A03AC41.1040505@schaufler-ca.com> (raw)
In-Reply-To: <20090507195729.GA21104@us.ibm.com>

Serge E. Hallyn wrote:
> Quoting Eric Paris (eparis@redhat.com):
>   
>> 3) I've also heard it hinted that we could do this with audit by just
>> having audit drop the denials that include the access(2) syscall and the
>> scontext and tcontext for the slew of things the SELinux policy writers
>> know we are not interested in.  And while it seems good, now we have
>>     
>
> What is the difference whether an attacker does access(2) to check for
> /etc/shadow rights, or does a failed open()?
>   

I have been studiously ignoring the discussions on the SELinux list because
in the end it really doesn't matter, as Serge (appears to) point out here.
The access() system call was a major thorn in the side of the POSIX security
working group because its behavior is not really very rational. By design
it does not take into account read-only file systems, ACLs, MAC labels,
TOMOYO policy, or anything other than the mode bits. A successful return
from access() gives you no assurance whatever that if you actually try the
operation it will succeed. My recollection is that every version of
"trusted unix" written treats the system call the same way it would a
call to lstat(), because that's really all it is doing.


--
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.

WARNING: multiple messages have this Message-ID (diff)
From: Casey Schaufler <casey@schaufler-ca.com>
To: "Serge E. Hallyn" <serue@us.ibm.com>
Cc: Eric Paris <eparis@redhat.com>,
	selinux@tycho.nsa.gov, linux-fsdevel@vger.kernel.org,
	linux-security-module@vger.kernel.org, viro@ZenIV.linux.org.uk,
	sds@tycho.nsa.gov
Subject: Re: SELinux and access(2), we want to know.
Date: Thu, 07 May 2009 20:51:29 -0700	[thread overview]
Message-ID: <4A03AC41.1040505@schaufler-ca.com> (raw)
In-Reply-To: <20090507195729.GA21104@us.ibm.com>

Serge E. Hallyn wrote:
> Quoting Eric Paris (eparis@redhat.com):
>   
>> 3) I've also heard it hinted that we could do this with audit by just
>> having audit drop the denials that include the access(2) syscall and the
>> scontext and tcontext for the slew of things the SELinux policy writers
>> know we are not interested in.  And while it seems good, now we have
>>     
>
> What is the difference whether an attacker does access(2) to check for
> /etc/shadow rights, or does a failed open()?
>   

I have been studiously ignoring the discussions on the SELinux list because
in the end it really doesn't matter, as Serge (appears to) point out here.
The access() system call was a major thorn in the side of the POSIX security
working group because its behavior is not really very rational. By design
it does not take into account read-only file systems, ACLs, MAC labels,
TOMOYO policy, or anything other than the mode bits. A successful return
from access() gives you no assurance whatever that if you actually try the
operation it will succeed. My recollection is that every version of
"trusted unix" written treats the system call the same way it would a
call to lstat(), because that's really all it is doing.


  parent reply	other threads:[~2009-05-08  3:51 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-07 19:18 SELinux and access(2), we want to know Eric Paris
2009-05-07 19:18 ` Eric Paris
2009-05-07 19:57 ` Serge E. Hallyn
2009-05-07 19:57   ` Serge E. Hallyn
2009-05-07 20:57   ` Eric Paris
2009-05-07 20:57     ` Eric Paris
2009-05-07 21:28     ` Serge E. Hallyn
2009-05-07 21:28       ` Serge E. Hallyn
2009-05-08  5:56     ` max
2009-05-08  3:51   ` Casey Schaufler [this message]
2009-05-08  3:51     ` Casey Schaufler
2009-05-08  5:16     ` Eamon Walsh
2009-05-08  5:16       ` Eamon Walsh
2009-05-08 12:27     ` Stephen Smalley
2009-05-08 12:27       ` Stephen Smalley
2009-05-08 12:46       ` Daniel J Walsh
2009-05-08 12:46         ` Daniel J Walsh
2009-05-08 14:17         ` Serge E. Hallyn
2009-05-08 14:17           ` Serge E. Hallyn
2009-05-08 14:53         ` Casey Schaufler
2009-05-08 14:53           ` Casey Schaufler
2009-05-08 13:05       ` Stephen Smalley
2009-05-08 13:05         ` Stephen Smalley
2009-05-08 13:14 ` Jamie Lokier
2009-05-08 13:29 ` Stephen Smalley
2009-05-08 13:29   ` Stephen Smalley

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=4A03AC41.1040505@schaufler-ca.com \
    --to=casey@schaufler-ca.com \
    --cc=eparis@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@tycho.nsa.gov \
    --cc=serue@us.ibm.com \
    --cc=viro@ZenIV.linux.org.uk \
    /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.