kernel-aes67/security
Andrew G. Morgan 5459c164f0 security: protect legacy applications from executing with insufficient privilege
When cap_bset suppresses some of the forced (fP) capabilities of a file,
it is generally only safe to execute the program if it understands how to
recognize it doesn't have enough privilege to work correctly.  For legacy
applications (fE!=0), which have no non-destructive way to determine that
they are missing privilege, we fail to execute (EPERM) any executable that
requires fP capabilities, but would otherwise get pP' < fP.  This is a
fail-safe permission check.

For some discussion of why it is problematic for (legacy) privileged
applications to run with less than the set of capabilities requested for
them, see:

 http://userweb.kernel.org/~morgan/sendmail-capabilities-war-story.html

With this iteration of this support, we do not include setuid-0 based
privilege protection from the bounding set.  That is, the admin can still
(ab)use the bounding set to suppress the privileges of a setuid-0 program.

[akpm@linux-foundation.org: coding-style fixes]
[akpm@linux-foundation.org: cleanup]
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-24 10:47:22 -07:00
..
keys keys: remove unused key_alloc_sem 2008-06-06 11:29:11 -07:00
selinux Revert "SELinux: allow fstype unknown to policy to use xattrs if present" 2008-07-15 18:32:49 +10:00
smack security: remove register_security hook 2008-07-14 15:04:06 +10:00
capability.c security: remove register_security hook 2008-07-14 15:04:06 +10:00
commoncap.c security: protect legacy applications from executing with insufficient privilege 2008-07-24 10:47:22 -07:00
device_cgroup.c devcgroup: fix permission check when adding entry to child cgroup 2008-07-13 12:51:18 -07:00
inode.c Kobject: convert remaining kobject_unregister() to kobject_put() 2008-01-24 20:40:40 -08:00
Kconfig security: remove dummy module fix 2008-07-14 15:03:41 +10:00
Makefile security: remove dummy module 2008-07-14 15:03:04 +10:00
root_plug.c security: remove register_security hook 2008-07-14 15:04:06 +10:00
security.c security: remove register_security hook 2008-07-14 15:04:06 +10:00