Ning Qiang fd97e4ad6d macintosh/adb: fix oob read in do_adb_query() function
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
2022-07-20 22:06:30 +10:00
..
2022-06-03 11:48:47 -07:00
2022-06-04 13:42:53 -07:00
2022-06-03 11:48:47 -07:00
2022-05-15 18:31:28 -06:00
2022-06-03 11:48:47 -07:00
2022-05-29 11:38:27 -07:00
2022-05-25 16:18:27 -07:00
2022-06-10 10:13:24 -07:00
2022-06-03 11:48:47 -07:00
2022-06-04 14:04:27 -07:00
2022-05-26 21:08:40 -07:00
2022-06-07 15:00:29 -07:00
2022-05-31 09:56:54 -07:00
2022-06-02 15:23:54 -07:00
2022-06-02 15:23:54 -07:00
2022-06-07 14:24:30 -07:00
2022-05-27 21:24:19 -07:00
2022-06-05 09:25:12 -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-06-12 11:33:42 -07: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-06-03 11:48:47 -07:00
2022-06-05 09:25:12 -07:00
2022-06-01 13:49:15 -07:00
2022-06-11 16:32:47 -07:00
2022-06-05 09:25:12 -07:00
2022-06-05 09:25:12 -07:00