linux/fs/smb
Namjae Jeon 9c4e202abf ksmbd: fix incorrect validation for num_aces field of smb_acl
commit 1b8b67f3c5 upstream.

parse_dcal() validate num_aces to allocate posix_ace_state_array.

if (num_aces > ULONG_MAX / sizeof(struct smb_ace *))

It is an incorrect validation that we can create an array of size ULONG_MAX.
smb_acl has ->size field to calculate actual number of aces in request buffer
size. Use this to check invalid num_aces.

Reported-by: Igor Leite Ladessa <igor-ladessa@hotmail.com>
Tested-by: Igor Leite Ladessa <igor-ladessa@hotmail.com>
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>
History 2025-03-28 21:59:01 +01:00
..
client smb: client: fix potential UAF in cifs_dump_full_key() 2025-03-28 21:58:58 +01:00
common ksmbd: return FILE_DEVICE_DISK instead of super magic 2024-07-25 09:49:19 +02:00
server ksmbd: fix incorrect validation for num_aces field of smb_acl 2025-03-28 21:59:01 +01:00
Kconfig smb: move client and server files to common directory fs/smb 2023-06-28 11:12:40 +02:00
Makefile smb: move client and server files to common directory fs/smb 2023-06-28 11:12:40 +02:00