]> git.karo-electronics.de Git - karo-tx-linux.git/commit
sysctl: fix write access to dmesg_restrict/kptr_restrict
authorKees Cook <keescook@chromium.org>
Wed, 4 Apr 2012 18:40:19 +0000 (11:40 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Apr 2012 16:13:55 +0000 (09:13 -0700)
commit9aa06b85e000ef2fcba2b8dfa3e57eb809e99026
treeb700bce98ea9832d219b7be1fe574d82fb3c7489
parent9fb1fd78804e9c0e477aafa69cd4d31b0a7ef5f0
sysctl: fix write access to dmesg_restrict/kptr_restrict

commit 620f6e8e855d6d447688a5f67a4e176944a084e8 upstream.

Commit bfdc0b4 adds code to restrict access to dmesg_restrict,
however, it incorrectly alters kptr_restrict rather than
dmesg_restrict.

The original patch from Richard Weinberger
(https://lkml.org/lkml/2011/3/14/362) alters dmesg_restrict as
expected, and so the patch seems to have been misapplied.

This adds the CAP_SYS_ADMIN check to both dmesg_restrict and
kptr_restrict, since both are sensitive.

Reported-by: Phillip Lougher <plougher@redhat.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Acked-by: Richard Weinberger <richard@nod.at>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/sysctl.c