diff options
author | Namjae Jeon <linkinjeon@kernel.org> | 2025-02-12 03:32:11 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-03-29 00:04:58 +0300 |
commit | f6a6721802ac2f12f4c1bbe839a4c229b61866f2 (patch) | |
tree | 8998c05355df5ae9248a9eae1732d0e664e69d72 /net/unix/sysctl_net_unix.c | |
parent | cad65562a54cf83337c40e5d1d77aed86d63df42 (diff) | |
download | linux-f6a6721802ac2f12f4c1bbe839a4c229b61866f2.tar.xz |
ksmbd: fix incorrect validation for num_aces field of smb_acl
commit 1b8b67f3c5e5169535e26efedd3e422172e2db64 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>
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
0 files changed, 0 insertions, 0 deletions