From: Stephen Smalley <sds@tycho.nsa.gov>
To: James Morris <jmorris@namei.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
David Miller <davem@davemloft.net>,
auke-jan.h.kok@intel.com,
Andrew Morton <akpm@linux-foundation.org>,
e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org,
Eric Paris <eparis@parisplace.org>,
Daniel J Walsh <dwalsh@redhat.com>
Subject: Re: [E1000-devel] networking probs in next-20081203
Date: Fri, 12 Dec 2008 16:24:46 -0500 [thread overview]
Message-ID: <1229117086.3134.22.camel@localhost.localdomain> (raw)
In-Reply-To: <alpine.LRH.1.10.0812122022520.32426@tundra.namei.org>
On Fri, 2008-12-12 at 20:26 +1100, James Morris wrote:
> On Fri, 12 Dec 2008, Alexey Dobriyan wrote:
>
> > Yes, please, someone test it.
>
> Still getting avc denials:
>
> avc: denied { mount } for pid=2308 comm="dhclient" name="/"
> dev=proc/net ino=4026531842 scontext=unconfined_u:system_r:dhcpc_t:s0-s0:c0.c1023
> tcontext=system_u:object_r:proc_t:s0 tclass=filesystem
> type=SYSCALL msg=audit(1229073699.174:53): arch=c000003e syscall=2
> success=no exit=-2 a0=45bef7 a1=80000 a2=1b6 a3=7f296
> e71c6f0 items=0 ppid=2259 pid=2308 auid=0 uid=0 gid=0 euid=0 suid=0
> fsuid=0 egid=0 sgid=0 fsgid=0 tty=ttyS0 ses=1 comm="
> dhclient" exe="/sbin/dhclient"
> subj=unconfined_u:system_r:dhcpc_t:s0-s0:c0.c1023 key=(null)
>
> It seems the problem is that the /proc/net mountpoint is now labeled as
> proc_t.
No, that's a check against the filesystem (superblock) label, not the
mountpoint directory.
proc_net_follow_link() creates a new mount, so we end up hitting
security_sb_kern_mount() => selinux_sb_kern_mount() and triggering this
permission check in the context of the current process on what is
supposed to be a kernel-internal mount of /proc/net.
Maybe pass flags down to security_sb_kern_mount() and skip the check in
the MS_KERNMOUNT case?
--
Stephen Smalley
National Security Agency
next prev parent reply other threads:[~2008-12-15 12:15 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-04 1:18 networking probs in next-20081203 Andrew Morton
2008-12-04 15:14 ` Alexey Dobriyan
2008-12-04 17:41 ` Kok, Auke
2008-12-04 17:52 ` Alexey Dobriyan
2008-12-04 18:11 ` [E1000-devel] " Stephen Smalley
2008-12-04 18:21 ` David Miller
2008-12-04 19:32 ` Stephen Smalley
2008-12-04 20:06 ` Stephen Smalley
2008-12-04 21:00 ` [E1000-devel] " Eric W. Biederman
2008-12-05 2:03 ` James Morris
2008-12-05 7:49 ` Eric W. Biederman
2008-12-05 14:12 ` Stephen Smalley
2008-12-11 10:41 ` James Morris
2008-12-12 5:24 ` Alexey Dobriyan
2008-12-12 9:26 ` James Morris
2008-12-12 9:29 ` James Morris
2008-12-12 10:51 ` Eric W. Biederman
2008-12-12 21:40 ` [E1000-devel] " James Morris
2008-12-12 21:24 ` Stephen Smalley [this message]
2008-12-15 13:28 ` James Morris
2008-12-19 1:04 ` [PATCH 0/3][RFC] Fix security and SELinux handling of proc/* filesystems James Morris
2008-12-19 1:05 ` [PATCH 1/3][RFC] SELinux: correctly detect proc filesystems of the form "proc/foo" James Morris
2008-12-19 12:29 ` David P. Quigley
2008-12-19 1:06 ` [PATCH 2/3][RFC] security: pass mount flags to security_sb_kern_mount() James Morris
2008-12-19 12:52 ` Stephen Smalley
2008-12-19 1:07 ` [PATCH 3/3][RFC] SELinux: don't check permissions for kernel mounts James Morris
2008-12-19 12:52 ` Stephen Smalley
2008-12-19 6:40 ` [PATCH 0/3][RFC] Fix security and SELinux handling of proc/* filesystems David Miller
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=1229117086.3134.22.camel@localhost.localdomain \
--to=sds@tycho.nsa.gov \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=auke-jan.h.kok@intel.com \
--cc=davem@davemloft.net \
--cc=dwalsh@redhat.com \
--cc=e1000-devel@lists.sourceforge.net \
--cc=ebiederm@xmission.com \
--cc=eparis@parisplace.org \
--cc=jmorris@namei.org \
--cc=netdev@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox