cifs: Use kzfree() to zero out the password
Subsystems (3)
PATCH 1/1 cifs: Use kzfree() to zero out the password
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 <[email protected]>
--- fs/cifs/connect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/cifs/connect.c +1 -1
@@ -3101,7 +3101,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; }
Signature · 1 line
2.20.1
Steve French
Appliedmerged into cifs-2.6.git for-next
Quoted 25 lines · Dan Carpenter
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 <[email protected]>--- fs/cifs/connect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/cifs/connect.c +1
-2@@ -3101,7 +3101,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; } --2.20.1
Signature · 3 lines
Thanks, Steve