[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m14ppwa64j.fsf@ebiederm.dsl.xmission.com>
Date: Thu, 08 Feb 2007 10:53:00 -0700
From: ebiederm@...ssion.com (Eric W. Biederman)
To: Stephen Smalley <sds@...ho.nsa.gov>
Cc: Andrew Morton <akpm@...l.org>, Ingo Molnar <mingo@...e.hu>,
tglx@...utronix.de, linux-kernel@...r.kernel.org,
selinux@...ho.nsa.gov, James Morris <jmorris@...ei.org>
Subject: Re: [PATCH 2/2] sysctl: Restore the selinux path based label lookup for sysctls.
Stephen Smalley <sds@...ho.nsa.gov> writes:
>
> Hmmm...turns out to not be quite enough, as the /proc/sys inodes aren't
> truly private to the fs, so we can run into them in a variety of
> security hooks beyond just the inode hooks, such as
> security_file_permission (when reading and writing them via the vfs
> helpers), security_sb_mount (when mounting other filesystems on
> directories in proc like binfmt_misc), and deeper within the security
> module itself (as in flush_unauthorized_files upon inheritance across
> execve). So I think we have to add an IS_PRIVATE() guard within
> SELinux, as below. Note however that the use of the private flag here
> could be confusing, as these inodes are _not_ private to the fs, are
> exposed to userspace, and security modules must implement the sysctl
> hook to get any access control over them.
Agreed, the naming is confusing, and using private here doesn't quite
feel right.
A practical question is: Will we ever encounter these inodes
in the inode_init() path from superblock_init? If all of the accesses
that we care about go through inode_doinit_with_dentry we can just
walk the dcache to get the names, and that should work for the normal
proc case as well.
A somewhat related question: How do you handle security labels for
sysfs? No fine grained security yet.
If it doesn't look easy to solve this another way I will certainly
go with marking the inodes private.
Eric
-
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