diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2019-08-27 13:59:17 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-09-21 07:15:38 +0200 |
commit | a8bea0667a33d9fbf21826c7c19b759d8eae5d11 (patch) | |
tree | 268f1f99e7328890ebb2f7b3a177741b3b44c7c9 /fs/cifs/connect.c | |
parent | 904847402bd74a28164bd4d8da082d1eace7c190 (diff) | |
download | linux-rt-a8bea0667a33d9fbf21826c7c19b759d8eae5d11.tar.gz |
cifs: Use kzfree() to zero out the password
[ Upstream commit 478228e57f81f6cb60798d54fc02a74ea7dd267e ]
It's safer to zero out the password so that it can never be disclosed.
Fixes: 0c219f5799c7 ("cifs: set domainName when a domain-key is used in multiuser")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 699e763ea671..f523a9ca9574 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -2662,7 +2662,7 @@ cifs_set_cifscreds(struct smb_vol *vol, struct cifs_ses *ses) rc = -ENOMEM; kfree(vol->username); vol->username = NULL; - kfree(vol->password); + kzfree(vol->password); vol->password = NULL; goto out_key_put; } |