Chih-Yen Chang
f0a96d1aaf
ksmbd: fix wrong UserName check in session_user
...
The offset of UserName is related to the address of security
buffer. To ensure the validaty of UserName, we need to compare name_off
+ name_len with secbuf_len instead of auth_msg_len.
[ 27.096243] ==================================================================
[ 27.096890] BUG: KASAN: slab-out-of-bounds in smb_strndup_from_utf16+0x188/0x350
[ 27.097609] Read of size 2 at addr ffff888005e3b542 by task kworker/0:0/7
...
[ 27.099950] Call Trace:
[ 27.100194] <TASK>
[ 27.100397] dump_stack_lvl+0x33/0x50
[ 27.100752] print_report+0xcc/0x620
[ 27.102305] kasan_report+0xae/0xe0
[ 27.103072] kasan_check_range+0x35/0x1b0
[ 27.103757] smb_strndup_from_utf16+0x188/0x350
[ 27.105474] smb2_sess_setup+0xaf8/0x19c0
[ 27.107935] handle_ksmbd_work+0x274/0x810
[ 27.108315] process_one_work+0x419/0x760
[ 27.108689] worker_thread+0x2a2/0x6f0
[ 27.109385] kthread+0x160/0x190
[ 27.110129] ret_from_fork+0x1f/0x30
[ 27.110454] </TASK>
Cc: stable@vger.kernel.org
Signed-off-by: Chih-Yen Chang <cc85nod@gmail.com>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
2023-05-16 10:26:14 -05:00
..
2023-05-05 19:12:01 -07:00
2023-01-19 09:24:02 +01:00
2023-02-20 14:10:36 -08:00
2023-05-06 11:25:03 -07:00
2023-01-19 09:24:28 +01:00
2023-01-19 09:24:28 +01:00
2023-05-12 17:10:32 -05:00
2023-04-13 11:49:35 -07:00
2023-05-04 14:48:02 -07:00
2023-05-10 17:48:30 -05:00
2023-04-27 16:52:33 -07:00
2023-04-03 09:23:54 +02:00
2023-03-02 21:54:23 -08:00
2023-04-06 11:16:39 -07:00
2023-02-27 10:04:49 -08:00
2023-03-13 12:36:34 +01:00
2023-04-26 16:07:23 -07:00
2023-03-06 09:57:12 +01:00
2023-02-23 14:41:48 -08:00
2023-04-24 14:25:39 -07:00
2023-03-01 08:42:27 -08:00
2023-01-19 09:24:28 +01:00
2023-04-26 09:07:46 -07:00
2023-05-13 18:05:05 -04:00
2023-04-26 09:42:10 -07:00
2023-02-23 17:55:40 -08:00
2023-02-23 17:55:40 -08:00
2023-01-30 12:51:54 +00:00
2023-04-27 11:53:57 -07:00
2023-05-10 17:15:18 +02:00
2023-02-23 17:55:40 -08:00
2023-04-12 11:29:32 +02:00
2023-04-20 23:04:40 +02:00
2023-01-19 09:24:26 +01:00
2023-04-21 14:52:05 -07:00
2023-04-29 10:35:48 -07:00
2022-10-12 11:00:22 -07:00
2023-04-14 19:38:50 -04:00
2023-03-06 09:57:13 +01:00
2023-04-24 19:20:27 -07:00
2023-04-27 11:53:57 -07:00
2023-05-16 10:26:14 -05:00
2023-04-29 11:04:14 -07:00
2023-02-24 19:01:15 -08:00
2023-04-27 19:42:02 -07:00
2023-05-09 10:22:13 -07:00
2023-04-13 13:13:52 -07:00
2023-04-29 11:04:14 -07:00
2023-05-06 10:10:07 -07:00
2023-04-25 12:36:55 +02:00
2023-04-13 11:49:35 -07:00
2023-04-29 10:52:37 -07:00
2023-04-27 19:57:00 -07:00
2023-01-19 09:24:28 +01:00
2023-04-27 19:42:02 -07:00
2023-03-06 09:57:13 +01:00
2023-05-02 19:24:16 -07:00
2023-04-27 17:03:40 -07:00
2023-03-14 12:56:30 -06:00
2023-03-14 12:56:30 -06:00
2023-04-14 13:06:50 +02:00
2023-04-05 19:42:46 -07:00
2023-04-26 09:07:46 -07:00
2023-01-18 17:12:56 -08:00
2023-05-02 09:23:23 -05:00
2023-02-03 17:52:25 -08:00
2023-03-12 20:03:41 -04:00
2023-01-19 09:24:26 +01:00
2023-04-23 23:36:38 +02:00
2023-03-13 11:16:16 +01:00
2023-03-28 16:20:14 -07:00
2023-04-13 13:13:54 -07:00
2023-01-19 09:24:26 +01:00
2023-04-11 19:23:23 -07:00
2023-05-11 16:51:11 -05:00
2023-03-30 20:56:02 +09:00
2023-02-10 15:34:48 -08:00
2022-08-20 11:34:04 -04:00
2023-03-30 08:51:48 +02:00
2023-01-19 09:24:28 +01:00
2023-04-08 13:45:37 -07:00
2023-04-27 19:57:00 -07:00
2022-12-02 13:57:04 -08:00
2023-04-27 19:42:02 -07:00
2022-12-02 17:48:59 +01:00
2023-05-02 17:21:50 -07:00
2022-08-20 11:34:33 -04:00
2023-04-05 18:06:23 -07:00
2022-10-10 19:45:17 -07:00
2023-03-05 20:27:41 -05:00
2023-04-06 10:01:50 +02:00
2023-04-27 19:57:00 -07:00
2023-04-28 15:57:53 -07:00
2023-02-20 11:53:11 -08:00
2022-09-01 17:36:39 -04:00
2023-01-11 06:52:32 -05:00
2023-03-09 22:46:21 -05:00
2022-12-01 10:46:54 -05:00
2023-05-06 08:28:58 -07:00
2023-01-19 09:24:28 +01:00
2023-04-27 19:42:02 -07:00
2023-04-29 11:10:39 -07:00
2023-01-19 09:24:29 +01:00
2023-04-18 16:30:09 -07:00
2022-10-10 14:21:11 -07:00
2023-04-03 09:23:54 +02:00
2023-03-09 22:36:12 +01:00
2023-05-03 19:02:03 -07:00
2022-12-08 21:49:25 -05:00
2023-01-19 09:24:30 +01:00
2023-04-18 16:30:02 -07:00
2023-04-29 11:10:39 -07:00
2023-04-24 19:14:20 -07:00
2023-04-20 22:55:35 -04:00
2023-03-22 11:06:55 +01:00
2023-05-12 17:17:27 +02:00
2023-04-06 14:53:38 +02:00
2023-03-06 09:59:20 +01:00
2023-03-30 08:12:29 -06:00
2022-08-17 17:25:04 -04:00
2023-01-19 09:24:29 +01:00
2022-11-25 13:01:55 -05:00
2023-05-06 08:15:20 -07:00
2023-02-20 11:53:11 -08:00
2023-03-28 16:20:17 -07:00
2023-04-27 19:42:02 -07:00
2023-02-20 11:53:11 -08:00
2023-03-06 09:59:20 +01:00