]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kernel/sys.c: fix stack memory content leak via UNAME26
authorKees Cook <keescook@chromium.org>
Fri, 12 Oct 2012 04:22:43 +0000 (15:22 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 18 Oct 2012 02:23:51 +0000 (13:23 +1100)
commit0a804250e0a2a6657b885ed46db2f180a9185c77
treee1a7983a3d83d4252477fb90923111b11533ba49
parent945dc1dfc360c99b0bda9da49a421949a2161f97
kernel/sys.c: fix stack memory content leak via UNAME26

Calling uname() with the UNAME26 personality set allows a leak of kernel
stack contents.  This fixes it by defensively calculating the length of
copy_to_user() call, making the len argument unsigned, and initializing
the stack buffer to zero (now technically unneeded, but hey, overkill).

CVE-2012-0957

Reported-by: PaX Team <pageexec@freemail.hu>
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: PaX Team <pageexec@freemail.hu>
Cc: Brad Spengler <spender@grsecurity.net>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kernel/sys.c