Skip to content

Commit e6e43b8

Browse files
quanglex97Steve French
authored andcommitted
fs/smb/client: Reset password pointer to NULL
Forget to reset ctx->password to NULL will lead to bug like double free Cc: stable@vger.kernel.org Cc: Willy Tarreau <w@1wt.eu> Reviewed-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Quang Le <quanglex97@gmail.com> Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent 6465e26 commit e6e43b8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/smb/client/fs_context.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1541,6 +1541,7 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
15411541

15421542
cifs_parse_mount_err:
15431543
kfree_sensitive(ctx->password);
1544+
ctx->password = NULL;
15441545
return -EINVAL;
15451546
}
15461547

0 commit comments

Comments
 (0)