linux/fs/smb
Fedor Pchelkin 68f9b0945b ksmbd: free ppace array on error in parse_dacl
commit 8cf9bedfc3 upstream.

The ppace array is not freed if one of the init_acl_state() calls inside
parse_dacl() fails. At the moment the function may fail only due to the
memory allocation errors so it's highly unlikely in this case but
nevertheless a fix is needed.

Move ppace allocation after the init_acl_state() calls with proper error
handling.

Found by Linux Verification Center (linuxtesting.org).

Fixes: e2f34481b2 ("cifsd: add server-side procedures for SMB3")
Cc: stable@vger.kernel.org
Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2024-01-20 11:53:01 +01:00
..
client cifs: do not depend on release_iface for maintaining iface_list 2023-12-29 09:11:26 -06:00
common ksmbd: fix wrong name of SMB2_CREATE_ALLOCATION_SIZE 2023-12-08 10:11:33 -06:00
server ksmbd: free ppace array on error in parse_dacl 2024-01-20 11:53:01 +01:00
Kconfig smb: move client and server files to common directory fs/smb 2023-05-24 16:29:21 -05:00
Makefile smb: move client and server files to common directory fs/smb 2023-05-24 16:29:21 -05:00