projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6465e26
)
fs/smb/client: Reset password pointer to NULL
author
Quang Le
<quanglex97@gmail.com>
Thu, 28 Sep 2023 17:44:13 +0000
(
00:44
+0700)
committer
Steve French
<stfrench@microsoft.com>
Thu, 28 Sep 2023 19:49:51 +0000
(14:49 -0500)
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>
fs/smb/client/fs_context.c
patch
|
blob
|
history
diff --git
a/fs/smb/client/fs_context.c
b/fs/smb/client/fs_context.c
index e45ce31bbda7174c8754a89aed4dfe76d413b8b5..a3493da12ad1e6cbac7249f3e8464cf7eeff542e 100644
(file)
--- a/
fs/smb/client/fs_context.c
+++ b/
fs/smb/client/fs_context.c
@@
-1541,6
+1541,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;
}