mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
UPSTREAM: fs/smb/client: Reset password pointer to NULL
commite6e43b8aa7upstream. Forget to reset ctx->password to NULL will lead to bug like double free Bug: 303146572 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> (cherry picked from commitf555a50808) Signed-off-by: Lee Jones <joneslee@google.com> Change-Id: Iec1eb857124e3b6ffa6dbbeb5f796087a6194057
This commit is contained in:
committed by
Treehugger Robot
parent
2807a43b69
commit
7d088a3e4f
@@ -1479,6 +1479,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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user