diff options
author | Ning Qiang <sohu0106@126.com> | 2022-07-13 23:37:34 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-08-11 12:57:53 +0200 |
commit | 3a0ef79c6abe61f5cb9583ac2f5e2748291bc056 (patch) | |
tree | 01a3bb2ce9cc0271da89d096311cb8aa71443062 /arch/x86/kvm | |
parent | 54e1abbe856020522a7952140c26a4426f01dab6 (diff) | |
download | linux-stable-3a0ef79c6abe61f5cb9583ac2f5e2748291bc056.tar.gz linux-stable-3a0ef79c6abe61f5cb9583ac2f5e2748291bc056.tar.bz2 linux-stable-3a0ef79c6abe61f5cb9583ac2f5e2748291bc056.zip |
macintosh/adb: fix oob read in do_adb_query() function
commit fd97e4ad6d3b0c9fce3bca8ea8e6969d9ce7423b upstream.
In do_adb_query() function of drivers/macintosh/adb.c, req->data is copied
form userland. The parameter "req->data[2]" is missing check, the array
size of adb_handler[] is 16, so adb_handler[req->data[2]].original_address and
adb_handler[req->data[2]].handler_id will lead to oob read.
Cc: stable <stable@kernel.org>
Signed-off-by: Ning Qiang <sohu0106@126.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220713153734.2248-1-sohu0106@126.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/x86/kvm')
0 files changed, 0 insertions, 0 deletions