linux/arch/metag
James Hogan ca19dd15e7 metag/uaccess: Check access_ok in strncpy_from_user
commit 3a158a62da upstream.

The metag implementation of strncpy_from_user() doesn't validate the src
pointer, which could allow reading of arbitrary kernel memory. Add a
short access_ok() check to prevent that.

Its still possible for it to read across the user/kernel boundary, but
it will invariably reach a NUL character after only 9 bytes, leaking
only a static kernel address being loaded into D0Re0 at the beginning of
__start, which is acceptable for the immediate fix.

Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: linux-metag@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-25 14:30:16 +02:00
..
boot metag: enable building of all dtbs 2015-10-27 16:12:16 -05:00
configs
include metag/uaccess: Check access_ok in strncpy_from_user 2017-05-25 14:30:16 +02:00
kernel metag/ptrace: Reject partial NT_METAG_RPIPE writes 2017-03-31 09:49:54 +02:00
lib metag/usercopy: Add missing fixups 2017-04-12 12:38:34 +02:00
mm kmap_atomic_to_page() has no users, remove it 2015-11-09 15:11:24 -08:00
oprofile
tbx
Kconfig
Kconfig.debug
Kconfig.soc
Makefile metag: use common make variables for dtb builds 2015-10-27 16:12:15 -05:00