Paulo Alcantara
ac48fcef5e
smb: client: fix OOB in smbCalcSize()
...
commit b35858b3786ddbb56e1c35138ba25d6adf8d0bef upstream.
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-01 12:42:43 +00:00
..
2023-11-28 17:19:46 +00:00
2023-08-29 20:21:42 -07:00
2023-08-29 20:21:42 -07:00
2024-01-01 12:42:34 +00:00
2023-08-28 11:39:14 -07:00
2023-08-29 20:21:42 -07:00
2023-08-29 20:21:42 -07:00
2024-01-01 12:42:24 +00:00
2023-08-29 14:25:26 -07:00
2023-10-27 16:44:58 -10:00
2023-08-28 09:31:32 -07:00
2023-07-13 10:28:05 +02:00
2023-08-28 11:04:18 -07:00
2023-11-20 11:59:26 +01:00
2023-08-28 10:17:14 -07:00
2023-11-20 11:59:37 +01:00
2023-12-03 07:33:03 +01:00
2023-09-11 09:10:02 +00:00
2023-08-29 20:21:42 -07:00
2023-11-20 11:59:23 +01:00
2023-11-28 17:19:44 +00:00
2023-08-29 17:45:22 -04:00
2023-12-08 08:52:19 +01:00
2023-12-20 17:02:01 +01:00
2023-11-28 17:20:11 +00:00
2023-08-29 20:21:42 -07:00
2023-08-29 20:21:42 -07:00
2023-12-20 17:01:52 +01:00
2023-11-28 17:20:11 +00:00
2023-08-29 20:21:42 -07:00
2023-08-29 20:21:42 -07:00
2023-07-24 10:30:00 +02:00
2023-08-29 20:21:42 -07:00
2023-11-28 17:20:05 +00:00
2023-10-19 09:41:36 -07:00
2023-08-29 20:21:42 -07:00
2023-11-28 17:20:04 +00:00
2023-07-24 10:30:01 +02:00
2023-11-28 17:19:43 +00:00
2023-09-01 09:43:18 -07:00
2023-08-29 17:45:22 -04:00
2023-08-29 20:21:42 -07:00
2023-09-18 12:03:46 -07:00
2023-11-28 17:19:49 +00:00
2024-01-01 12:42:42 +00:00
2023-12-13 18:45:22 +01:00
2023-08-31 12:07:34 -05:00
2023-10-19 16:19:20 +02:00
2023-08-29 20:21:42 -07:00
2023-10-19 09:10:18 -07:00
2023-08-31 15:18:15 -07:00
2023-08-29 20:21:42 -07:00
2023-07-24 10:30:03 +02:00
2023-08-11 09:04:57 +02:00
2023-12-03 07:33:03 +01:00
2023-11-28 17:19:57 +00:00
2023-11-20 11:58:53 +01:00
2023-08-29 20:21:42 -07:00
2023-08-29 20:21:42 -07:00
2023-11-28 17:20:04 +00:00
2023-07-24 10:30:04 +02:00
2023-09-11 14:07:46 +02:00
2023-08-29 20:21:42 -07:00
2024-01-01 12:42:43 +00:00
2023-07-24 10:30:05 +02:00
2023-08-29 20:21:42 -07:00
2023-12-20 17:02:00 +01:00
2023-08-11 09:04:57 +02:00
2023-08-30 12:10:50 -07:00
2023-08-29 20:21:42 -07:00
2023-08-28 09:31:32 -07:00
2023-08-20 10:33:43 -07:00
2023-11-28 17:20:09 +00:00
2023-08-28 11:59:52 -07:00
2023-09-20 14:22:01 +02:00
2023-08-28 10:17:14 -07:00
2023-08-11 09:04:57 +02:00
2023-09-29 17:20:45 -07:00
2023-06-28 20:35:21 -07:00
2023-07-13 10:28:04 +02:00
2023-09-25 08:55:00 -07:00
2023-06-26 09:50:21 -07:00
2023-08-24 16:20:30 -07:00
2023-08-19 13:41:11 +02:00
2023-06-28 10:28:11 -07:00
2023-08-18 10:12:11 -07:00
2023-07-11 11:41:34 +02:00
2023-07-26 14:56:07 +02:00
2023-08-29 14:53:51 -07:00
2023-07-10 14:36:11 +02:00
2023-08-08 19:36:51 +02:00
2023-08-28 10:17:14 -07:00
2023-10-12 18:53:36 +03:00
2023-08-21 13:46:25 -07:00
2023-11-20 11:58:52 +01:00
2023-08-14 18:48:02 +02:00
2023-12-03 07:33:03 +01:00
2023-08-29 20:21:42 -07:00
2023-08-28 11:04:18 -07:00
2023-08-29 20:21:42 -07:00
2023-08-23 14:17:43 -07:00
2023-08-19 12:12:12 +02:00
2023-12-03 07:33:03 +01:00
2023-08-31 15:32:18 -07:00
2023-08-02 09:13:09 -06:00
2023-10-13 18:34:46 +02:00
2023-06-26 10:27:04 -07:00
2023-07-13 10:28:04 +02:00
2023-12-20 17:01:51 +01:00
2023-09-20 14:22:01 +02:00
2023-07-13 10:28:04 +02:00
2023-08-15 08:32:45 +02:00
2023-08-06 15:08:35 +02:00
2023-08-29 14:25:26 -07:00
2023-07-13 10:28:04 +02:00
2023-12-03 07:33:03 +01:00
2023-08-31 12:47:15 +02:00
2023-08-24 16:20:27 -07:00
2023-08-22 10:57:46 +02:00