2024-01-09 23:14 GMT+09:00, Fedor Pchelkin <pchelkin@xxxxxxxxx>: > 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@xxxxxxxxx> Acked-by: Namjae Jeon <linkinjeon@xxxxxxxxxx> Applied it to #ksmbd-for-next-next. Thanks for your patch!