mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-21 18:11:39 +00:00
fs/smb/client: Reset password pointer to NULL
commit e6e43b8aa7
upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1983fd7870
commit
f555a50808
1 changed files with 1 additions and 0 deletions
|
@ -1487,6 +1487,7 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
|
|||
|
||||
cifs_parse_mount_err:
|
||||
kfree_sensitive(ctx->password);
|
||||
ctx->password = NULL;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue