]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mmap_min_addr check CAP_SYS_RAWIO only for write
authorKees Cook <kees.cook@canonical.com>
Thu, 22 Apr 2010 19:19:17 +0000 (12:19 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 26 May 2010 21:29:21 +0000 (14:29 -0700)
commit734c542a8aa9d7d49ffed09e671972851f25df5e
tree462b8ddd114b1949a4e9475a7eb2255d4d80a791
parent9e79d5307f9e53930b1cca4440e2691e0c4d0293
mmap_min_addr check CAP_SYS_RAWIO only for write

commit 4ae69e6b718589abe97c9625ccbb1e0bc95a8c0e upstream.

Redirecting directly to lsm, here's the patch discussed on lkml:
http://lkml.org/lkml/2010/4/22/219

The mmap_min_addr value is useful information for an admin to see without
being root ("is my system vulnerable to kernel NULL pointer attacks?") and
its setting is trivially easy for an attacker to determine by calling
mmap() in PAGE_SIZE increments starting at 0, so trying to keep it private
has no value.

Only require CAP_SYS_RAWIO if changing the value, not reading it.

Comment from Serge :

  Me, I like to write my passwords with light blue pen on dark blue
  paper, pasted on my window - if you're going to get my password, you're
  gonna get a headache.

Signed-off-by: Kees Cook <kees.cook@canonical.com>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
(cherry picked from commit 822cceec7248013821d655545ea45d1c6a9d15b3)
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
security/min_addr.c