summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2017-05-02 19:41:06 +0100
committerBen Hutchings <ben@decadent.org.uk>2017-08-26 02:14:45 +0100
commit641ddffc6fd2489f0f3aaba3fba8c5f012364d68 (patch)
treeba2fdded0762a8d9bc3a03be09a6adb707ea0324 /kernel
parent9690ad86f261871acfc7413f043e6a6467733755 (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: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions