Kuan-Ting Chen
7cf3bf3cc0
ksmbd: fix slab-out-of-bounds read in smb2_handle_negotiate
...
[ Upstream commit d738950f112c8f40f0515fe967db998e8235a175 ]
Check request_buf length first to avoid out-of-bounds read by
req->DialectCount.
[ 3350.990282] BUG: KASAN: slab-out-of-bounds in smb2_handle_negotiate+0x35d7/0x3e60
[ 3350.990282] Read of size 2 at addr ffff88810ad61346 by task kworker/5:0/276
[ 3351.000406] Workqueue: ksmbd-io handle_ksmbd_work
[ 3351.003499] Call Trace:
[ 3351.006473] <TASK>
[ 3351.006473] dump_stack_lvl+0x8d/0xe0
[ 3351.006473] print_report+0xcc/0x620
[ 3351.006473] kasan_report+0x92/0xc0
[ 3351.006473] smb2_handle_negotiate+0x35d7/0x3e60
[ 3351.014760] ksmbd_smb_negotiate_common+0x7a7/0xf00
[ 3351.014760] handle_ksmbd_work+0x3f7/0x12d0
[ 3351.014760] process_one_work+0xa85/0x1780
Cc: stable@vger.kernel.org
Signed-off-by: Kuan-Ting Chen <h3xrabbit@gmail.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-06-21 15:59:12 +02:00
..
2023-05-17 11:50:28 +02:00
2023-05-17 11:50:29 +02:00
2023-05-17 11:50:28 +02:00
2023-05-24 17:36:54 +01:00
2023-05-17 11:50:28 +02:00
2021-09-29 16:17:34 -05:00
2021-09-29 16:17:34 -05:00
2021-10-07 10:18:34 -05:00
2021-11-18 19:16:07 +01:00
2023-02-01 08:27:24 +01:00
2021-06-30 14:47:24 +09:00
2021-07-09 08:23:16 +09:00
2021-09-30 20:00:05 -05:00
2021-09-24 21:25:23 -05:00
2023-02-01 08:27:24 +01:00
2021-07-02 16:27:10 +09:00
2023-05-24 17:36:54 +01:00
2023-05-24 17:36:54 +01:00
2023-05-11 23:00:18 +09:00
2023-02-01 08:27:24 +01:00
2023-05-24 17:36:54 +01:00
2022-01-27 11:02:53 +01:00
2023-06-21 15:59:12 +02:00
2023-02-01 08:27:24 +01:00
2023-03-30 12:47:58 +02:00
2023-05-17 11:50:28 +02:00
2022-08-21 15:17:48 +02:00
2022-08-21 15:17:48 +02:00
2023-02-01 08:27:24 +01:00
2021-10-20 00:07:10 -05:00
2023-04-05 11:24:52 +02:00
2023-02-01 08:27:24 +01:00
2023-04-05 11:24:52 +02:00
2023-05-17 11:50:28 +02:00
2021-09-03 23:29:45 -05:00
2023-05-17 11:50:28 +02:00
2022-02-23 12:03:18 +01:00
2021-06-30 14:47:24 +09:00