[lvc-project] [PATCH v2] ksmbd: free ppace array on error in parse_dacl
Namjae Jeon
linkinjeon at kernel.org
Wed Jan 10 03:28:16 MSK 2024
2024-01-09 23:14 GMT+09:00, Fedor Pchelkin <pchelkin at ispras.ru>:
> 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: e2f34481b24d ("cifsd: add server-side procedures for SMB3")
> Signed-off-by: Fedor Pchelkin <pchelkin at ispras.ru>
Acked-by: Namjae Jeon <linkinjeon at kernel.org>
Applied it to #ksmbd-for-next-next.
Thanks for your patch!
More information about the lvc-project
mailing list