[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1296503752.26427.50.camel@moss-pluto>
Date: Mon, 31 Jan 2011 14:55:52 -0500
From: Stephen Smalley <sds@...ho.nsa.gov>
To: Lucian Adrian Grijincu <lucian.grijincu@...il.com>
Cc: James Morris <jmorris@...ei.org>,
Eric Paris <eparis@...isplace.org>,
Al Viro <viro@...iv.linux.org.uk>,
Christoph Hellwig <hch@....de>,
Dave Chinner <dchinner@...hat.com>,
Arnd Bergmann <arnd@...db.de>, linux-kernel@...r.kernel.org,
linux-security-module@...r.kernel.org,
selinux <selinux@...ho.nsa.gov>,
"Eric W. Biederman" <ebiederm@...ssion.com>
Subject: Re: [PATCH 2/2] RFC: selinux: sysctl: fix selinux labeling broken
by last patch
On Mon, 2011-01-31 at 13:35 -0500, Stephen Smalley wrote:
> On Mon, 2011-01-31 at 19:03 +0200, Lucian Adrian Grijincu wrote:
> > On Mon, Jan 31, 2011 at 6:59 PM, Stephen Smalley <sds@...ho.nsa.gov> wrote:
> > > /proc/sys inode labeling was disabled earlier (hence marked S_PRIVATE)
> > > when /proc/sys was reimplemented by Eric, so all access control
> > > on /proc/sys was switched to using the sysctl hook rather than the
> > > inode-based checking. That's why you don't get a result from ls -Z
> > > on /proc/sys on current kernels. Getting actual labeling working again
> > > for those inodes would be a win, so your patch is an improvement in that
> > > regard for selinux.
> >
> >
> > Oh, OK. Thanks for letting me know.
> >
> > Do you see anything else that is wrong with these patches (apart from
> > "//deleted")?
>
> No, although I think someone should take them for a spin on a modern
> Fedora in enforcing mode for a bit, and likely run the selinux testsuite
> too.
Booting F14 with your patch applied yields a large number of AVC denials
of the form:
type=AVC msg=audit(1296503592.932:1220139): avc: denied { read } for
pid=1896 comm="gnome-settings-" path="anon_inode:inotify"
dev=anon_inodefs ino=5312
scontext=system_u:system_r:xdm_t:s0-s0:c0.c1023
tcontext=system_u:object_r:unlabeled_t:s0 tclass=file
So I assume that the anon_inodefs inodes are being marked private too,
and relying on that test within inode_has_perm to avoid permission
checks. Which would mean that you need to leave that test alone after
all.
The /proc labeling looks good though.
--
Stephen Smalley
National Security Agency
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists