Ning Qiang 224b653547 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>
2022-08-11 13:22:05 +02:00
..
2022-06-26 14:12:56 -07:00
2022-05-15 18:31:28 -06:00
2022-07-15 13:54:14 +02:00
2022-07-15 10:12:22 -07:00
2022-07-22 12:28:47 -07:00
2022-07-29 13:25:31 -07:00
2022-07-17 07:52:46 -07:00
2022-06-02 15:23:54 -07:00
2022-07-22 12:41:14 -07:00
2022-06-02 15:23:54 -07:00
2022-05-25 16:18:27 -07:00
2022-05-25 15:02:26 +02:00
2022-06-03 11:48:47 -07:00
2022-06-02 15:23:54 -07:00
2022-05-23 21:06:11 -07:00
2022-05-19 16:56:17 +02:00
2022-07-15 10:12:22 -07:00
2022-05-09 23:09:10 +02:00
2022-06-03 11:48:47 -07:00
2022-06-02 15:23:54 -07:00
2022-06-03 11:48:47 -07:00
2022-05-11 08:29:11 +03:00
2022-07-14 16:22:12 +02:00
2022-06-05 09:25:12 -07:00
2022-06-05 09:25:12 -07:00