summaryrefslogtreecommitdiff
path: root/arch/h8300/kernel
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2017-05-02 19:41:06 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-05-25 14:30:16 +0200
commitca19dd15e7bb29ed8fc0d531af96df37a4988737 (patch)
tree402d55b4fd743db9f54a68f07cf68f70cad1be73 /arch/h8300/kernel
parent2d9b2e7808325ea8f534041a8affb44c461406fd (diff)
metag/uaccess: Check access_ok in strncpy_from_user
commit 3a158a62da0673db918b53ac1440845a5b64fd90 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>
Diffstat (limited to 'arch/h8300/kernel')
0 files changed, 0 insertions, 0 deletions