xtensa: prevent arbitrary read in ptrace
commitef8b14b4fd36fbf79a7823b5741fa901755ee62d
authorDan Rosenberg <drosenberg@vsecurity.com>
Tue, 26 Jul 2011 00:11:53 +0000 (25 17:11 -0700)
committerAndi Kleen <ak@linux.intel.com>
Mon, 1 Aug 2011 20:55:00 +0000 (1 13:55 -0700)
tree17d7f205da9f675b939aa8b17655efb094988a74
parent6b1ffd2fa340aca8687ec0d1795c0be19f72a29c
xtensa: prevent arbitrary read in ptrace

[ upstream commit 0d0138ebe24b94065580bd2601f8bb7eb6152f56 ]

Prevent an arbitrary kernel read.  Check the user pointer with access_ok()
before copying data in.

[akpm@linux-foundation.org: s/EIO/EFAULT/]
Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com>
Cc: Christian Zankel <chris@zankel.net>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
arch/xtensa/kernel/ptrace.c