Namjae Jeon
bb5bf157b5
ksmbd: replace one-element array with flex-array member in struct smb2_ea_info
...
commit 0ba5439d9afa2722e7728df56f272c89987540a4 upstream.
UBSAN complains about out-of-bounds array indexes on 1-element arrays in
struct smb2_ea_info.
UBSAN: array-index-out-of-bounds in fs/smb/server/smb2pdu.c:4335:15
index 1 is out of range for type 'char [1]'
CPU: 1 PID: 354 Comm: kworker/1:4 Not tainted 6.5.0-rc4 #1
Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop
Reference Platform, BIOS 6.00 07/22/2020
Workqueue: ksmbd-io handle_ksmbd_work [ksmbd]
Call Trace:
<TASK>
__dump_stack linux/lib/dump_stack.c:88
dump_stack_lvl+0x48/0x70 linux/lib/dump_stack.c:106
dump_stack+0x10/0x20 linux/lib/dump_stack.c:113
ubsan_epilogue linux/lib/ubsan.c:217
__ubsan_handle_out_of_bounds+0xc6/0x110 linux/lib/ubsan.c:348
smb2_get_ea linux/fs/smb/server/smb2pdu.c:4335
smb2_get_info_file linux/fs/smb/server/smb2pdu.c:4900
smb2_query_info+0x63ae/0x6b20 linux/fs/smb/server/smb2pdu.c:5275
__process_request linux/fs/smb/server/server.c:145
__handle_ksmbd_work linux/fs/smb/server/server.c:213
handle_ksmbd_work+0x348/0x10b0 linux/fs/smb/server/server.c:266
process_one_work+0x85a/0x1500 linux/kernel/workqueue.c:2597
worker_thread+0xf3/0x13a0 linux/kernel/workqueue.c:2748
kthread+0x2b7/0x390 linux/kernel/kthread.c:389
ret_from_fork+0x44/0x90 linux/arch/x86/kernel/process.c:145
ret_from_fork_asm+0x1b/0x30 linux/arch/x86/entry/entry_64.S:304
</TASK>
Cc: stable@vger.kernel.org
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-09-06 21:28:37 +01: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-09-06 21:28:37 +01:00
2023-05-24 17:36:54 +01:00
2023-07-23 13:47:39 +02:00
2023-02-01 08:27:24 +01:00
2023-08-16 18:21:57 +02:00
2022-01-27 11:02:53 +01:00
2023-09-06 21:28:37 +01:00
2023-09-06 21:28:37 +01:00
2023-07-23 13:47:18 +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-08-03 10:22:30 +02:00
2022-02-23 12:03:18 +01:00
2021-06-30 14:47:24 +09:00