Paulo Alcantara
ded3cfdefe
smb: client: fix OOB in smbCalcSize()
...
[ Upstream commit b35858b3786ddbb56e1c35138ba25d6adf8d0bef ]
Validate @smb->WordCount to avoid reading off the end of @smb and thus
causing the following KASAN splat:
BUG: KASAN: slab-out-of-bounds in smbCalcSize+0x32/0x40 [cifs]
Read of size 2 at addr ffff88801c024ec5 by task cifsd/1328
CPU: 1 PID: 1328 Comm: cifsd Not tainted 6.7.0-rc5 #9
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS
rel-1.16.2-3-gd478f380-rebuilt.opensuse.org 04/01/2014
Call Trace:
<TASK>
dump_stack_lvl+0x4a/0x80
print_report+0xcf/0x650
? srso_alias_return_thunk+0x5/0xfbef5
? srso_alias_return_thunk+0x5/0xfbef5
? __phys_addr+0x46/0x90
kasan_report+0xd8/0x110
? smbCalcSize+0x32/0x40 [cifs]
? smbCalcSize+0x32/0x40 [cifs]
kasan_check_range+0x105/0x1b0
smbCalcSize+0x32/0x40 [cifs]
checkSMB+0x162/0x370 [cifs]
? __pfx_checkSMB+0x10/0x10 [cifs]
cifs_handle_standard+0xbc/0x2f0 [cifs]
? srso_alias_return_thunk+0x5/0xfbef5
cifs_demultiplex_thread+0xed1/0x1360 [cifs]
? __pfx_cifs_demultiplex_thread+0x10/0x10 [cifs]
? srso_alias_return_thunk+0x5/0xfbef5
? lockdep_hardirqs_on_prepare+0x136/0x210
? __pfx_lock_release+0x10/0x10
? srso_alias_return_thunk+0x5/0xfbef5
? mark_held_locks+0x1a/0x90
? lockdep_hardirqs_on_prepare+0x136/0x210
? srso_alias_return_thunk+0x5/0xfbef5
? srso_alias_return_thunk+0x5/0xfbef5
? __kthread_parkme+0xce/0xf0
? __pfx_cifs_demultiplex_thread+0x10/0x10 [cifs]
kthread+0x18d/0x1d0
? kthread+0xdb/0x1d0
? __pfx_kthread+0x10/0x10
ret_from_fork+0x34/0x60
? __pfx_kthread+0x10/0x10
ret_from_fork_asm+0x1b/0x30
</TASK>
This fixes CVE-2023-6606.
Reported-by: j51569436@gmail.com
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218218
Cc: stable@vger.kernel.org
Signed-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-05 15:13:38 +01:00
..
2021-06-20 21:28:17 -05:00
2021-09-13 14:51:10 -05:00
2023-03-30 12:47:55 +02:00
2021-06-20 21:28:17 -05:00
2023-08-03 10:22:29 +02:00
2022-12-02 17:40:59 +01:00
2021-09-13 14:51:10 -05:00
2021-06-20 21:28:17 -05:00
2023-11-28 16:56:25 +00:00
2021-09-13 14:51:10 -05:00
2021-08-25 15:47:06 -05:00
2021-04-25 16:28:22 -05:00
2021-09-13 14:51:10 -05:00
2022-03-08 19:12:30 +01:00
2021-09-13 14:51:10 -05:00
2021-09-13 14:51:10 -05:00
2023-12-13 18:36:50 +01:00
2023-04-05 11:24:59 +02:00
2023-05-24 17:36:54 +01:00
2021-09-13 14:51:10 -05:00
2023-01-12 11:58:41 +01:00
2023-04-05 11:24:58 +02:00
2023-05-17 11:50:23 +02:00
2023-02-06 07:59:00 +01:00
2021-07-22 11:43:23 -05:00
2022-10-29 10:12:56 +02:00
2021-09-13 14:51:10 -05:00
2021-09-13 14:51:10 -05:00
2021-09-13 14:51:10 -05:00
2023-08-26 14:23:36 +02:00
2023-05-30 13:55:32 +01:00
2023-04-13 16:48:24 +02:00
2021-09-13 14:51:10 -05:00
2021-09-13 14:51:10 -05:00
2023-10-06 13:18:17 +02:00
2022-11-26 09:24:41 +01:00
2021-08-25 15:48:00 -05:00
2023-01-18 11:48:49 +01:00
2021-06-20 21:28:17 -05:00
2024-01-05 15:13:38 +01:00
2021-06-20 21:28:16 -05:00
2020-12-14 09:16:22 -06:00
2021-09-13 14:51:10 -05:00
2021-09-13 14:51:10 -05:00
2021-09-13 14:51:10 -05:00
2021-09-13 14:51:10 -05:00
2022-10-29 10:12:56 +02:00
2023-05-24 17:36:54 +01:00
2021-09-13 14:51:10 -05:00
2021-09-13 14:51:10 -05:00
2023-03-22 13:31:33 +01:00
2021-08-25 15:51:52 -05:00
2024-01-05 15:13:31 +01:00
2024-01-05 15:13:32 +01:00
2024-01-05 15:13:38 +01:00
2024-01-05 15:13:31 +01:00
2021-09-13 14:51:10 -05:00
2021-09-13 14:51:10 -05:00
2023-11-28 16:56:25 +00:00
2023-03-10 09:39:32 +01:00
2021-09-08 23:59:26 -05:00
2021-09-13 14:51:10 -05:00
2021-05-27 14:04:32 -05:00
2023-03-22 13:31:22 +01:00
2021-04-25 16:28:23 -05:00
2021-09-13 14:51:10 -05:00
2023-12-08 08:48:04 +01:00