linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC][PATCH 0/3] Enable atomic inode security labeling
@ 2005-07-08 13:25 Stephen Smalley
  2005-07-08 13:48 ` [RFC][PATCH 1/3] security: " Stephen Smalley
                   ` (5 more replies)
  0 siblings, 6 replies; 25+ messages in thread
From: Stephen Smalley @ 2005-07-08 13:25 UTC (permalink / raw)
  To: linuxfs
  Cc: Alexander Viro, Ext2-devel, Andreas Gruenbacher, Andreas Dilger,
	Andrew Morton, Stephen Tweedie, James Morris, Chris Wright

The following patch set enables atomic security labeling of newly
created inodes by altering the fs code to invoke a new LSM hook to
obtain the security attribute to apply to a newly created inode and to
set up the incore inode security state during the inode creation
transaction.  This parallels the existing processing for setting ACLs
on newly created inodes.  Otherwise, it is possible for new inodes to
be accessed by another thread via the dcache prior to complete
security setup (presently handled by the post_create/mkdir/... LSM
hooks in the VFS) and a newly created inode may be left unlabeled on
the disk in the event of a crash.  SELinux presently works around the
issue by ensuring that the incore inode security label is initialized
to a special SID that is inaccessible to unprivileged processes (in
accordance with policy), thereby preventing inappropriate access but
potentially causing false denials on legitimate accesses.  A simple test
program demonstrates such false denials on SELinux, and the patch solves the
problem.  Similar such false denials have been encountered in real applications.

Please let me know if you have any comments or suggestions for improvement.

The patches are split up for the LSM/SELinux changes, the ext2
changes, and the ext3 changes.  Similar changes would be desirable for
other filesystems that support security attributes as well, such as
jfs and xfs.  A full diffstat of all three patches is below.

 fs/ext2/ialloc.c                  |    5 +++
 fs/ext2/xattr.h                   |    1 
 fs/ext2/xattr_security.c          |   22 +++++++++++++
 fs/ext3/ialloc.c                  |    5 +++
 fs/ext3/xattr.h                   |    1 
 fs/ext3/xattr_security.c          |   22 +++++++++++++
 include/linux/security.h          |   41 +++++++++++++++++++++++++
 security/dummy.c                  |    7 ++++
 security/selinux/hooks.c          |   60 ++++++++++++++++++++++++++++++++++++++
 security/selinux/include/objsec.h |    1 
 10 files changed, 165 insertions(+)

-- 
Stephen Smalley
National Security Agency



-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2005-07-14 20:51 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-08 13:25 [RFC][PATCH 0/3] Enable atomic inode security labeling Stephen Smalley
2005-07-08 13:48 ` [RFC][PATCH 1/3] security: " Stephen Smalley
2005-07-08 13:55 ` [RFC][PATCH 2/3] ext2: " Stephen Smalley
2005-07-10 23:39   ` Christoph Hellwig
2005-07-11 12:53     ` Stephen Smalley
2005-07-12  2:29       ` Christoph Hellwig
2005-07-13 20:37   ` Dave Kleikamp
2005-07-13 20:41     ` Stephen Smalley
2005-07-13 20:50     ` Andrew Morton
2005-07-08 13:58 ` [RFC][PATCH 3/3] ext3: " Stephen Smalley
2005-07-11 16:07   ` Stephen C. Tweedie
2005-07-11 16:14     ` Jan Kara
2005-07-11 16:50       ` Stephen C. Tweedie
2005-07-12 14:15         ` [Ext2-devel] " Jan Kara
2005-07-10 23:40 ` [RFC][PATCH 0/3] " Christoph Hellwig
2005-07-11 13:31   ` Stephen Smalley
2005-07-12  2:32     ` Christoph Hellwig
2005-07-13 15:05 ` [RFC][PATCH 2.6.13-rc2-mm2] tmpfs: " Stephen Smalley
2005-07-14 19:29   ` [RFC][PATCH] Remove security_inode_post_create/mkdir/symlink/mknod hooks Stephen Smalley
2005-07-14 19:41     ` Chris Wright
2005-07-14 20:51       ` Stephen Smalley
2005-07-14 16:16 ` [RFC][PATCH 0/2] JFS atomic inode security labeling Dave Kleikamp
2005-07-14 16:19   ` [RFC][PATCH 1/2] JFS atomic xattr/acl handling Dave Kleikamp
2005-07-14 16:20   ` [RFC][PATCH 2/2] JFS atomic inode security labeling Dave Kleikamp
2005-07-14 16:26   ` [RFC][PATCH 0/2] " Dave Kleikamp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).