Skip to content

Commit f75a1fd

Browse files
committed
fs/smb/client: Reset password pointer to NULL
jira VULN-9356 cve CVE-2023-5345 commit-author Quang Le <[email protected]> commit e6e43b8 Forget to reset ctx->password to NULL will lead to bug like double free Cc: [email protected] Cc: Willy Tarreau <[email protected]> Reviewed-by: Namjae Jeon <[email protected]> Signed-off-by: Quang Le <[email protected]> Signed-off-by: Steve French <[email protected]> (cherry picked from commit e6e43b8) Signed-off-by: Marcin Wcisło <[email protected]> # Conflicts: # fs/cifs/fs_context.c
1 parent bb1b0a8 commit f75a1fd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/cifs/fs_context.c

+2
Original file line numberDiff line numberDiff line change
@@ -1458,6 +1458,8 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
14581458
return 0;
14591459

14601460
cifs_parse_mount_err:
1461+
kfree_sensitive(ctx->password);
1462+
ctx->password = NULL;
14611463
return -EINVAL;
14621464
}
14631465

0 commit comments

Comments
 (0)