diff options
author | Eric Paris <eparis@redhat.com> | 2007-02-10 04:43:19 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-11 13:51:19 -0500 |
commit | 6ff1b4426e3afc61dcb67299709fde9041d59265 (patch) | |
tree | aa6856d926d26e768809b60f1aa21b78ce0589c2 /kernel/sysctl.c | |
parent | daa88c8d214ca4ab2f1764b6e503cef4b3cde9b2 (diff) |
[PATCH] make reading /proc/sys/kernel/cap-bould not require CAP_SYS_MODULE
Reading /proc/sys/kernel/cap-bound requires CAP_SYS_MODULE. (see
proc_dointvec_bset in kernel/sysctl.c)
sysctl appears to drive all over proc reading everything it can get it's
hands on and is complaining when it is being denied access to read
cap-bound. Clearly writing to cap-bound should be a sensitive operation
but requiring CAP_SYS_MODULE to read cap-bound seems a bit to strong. I
believe the information could with reasonable certainty be obtained by
looking at a bunch of the output of /proc/pid/status which has very low
security protection, so at best we are just getting a little obfuscation of
information.
Currently SELinux policy has to 'dontaudit' capability checks for
CAP_SYS_MODULE for things like sysctl which just want to read cap-bound.
In doing so we also as a byproduct have to hide warnings of potential
exploits such as if at some time that sysctl actually tried to load a
module. I wondered if anyone would have a problem opening cap-bound up to
read from anyone?
Acked-by: Chris Wright <chrisw@sous-sol.org>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Cc: James Morris <jmorris@namei.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r-- | kernel/sysctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 600b33358de..41bbba1a15d 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -1961,7 +1961,7 @@ int proc_dointvec_bset(ctl_table *table, int write, struct file *filp, | |||
1961 | { | 1961 | { |
1962 | int op; | 1962 | int op; |
1963 | 1963 | ||
1964 | if (!capable(CAP_SYS_MODULE)) { | 1964 | if (write && !capable(CAP_SYS_MODULE)) { |
1965 | return -EPERM; | 1965 | return -EPERM; |
1966 | } | 1966 | } |
1967 | 1967 | ||