smb: client: Handle kstrdup failures for passwords
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
smb: client: Handle kstrdup failures for passwords
In smb3_reconfigure(), after duplicating ctx->password and ctx->password2 with kstrdup(), we need to check for allocation failures.
If ses->password allocation fails, return -ENOMEM. If ses->password2 allocation fails, free ses->password, set it to NULL, and return -ENOMEM.
From the CVE record · Linux
The Linux kernel SMB client did not check whether password duplication succeeded during SMB3 reconfiguration. If either allocation fails, the client can mishandle the failure; the input does not specify an attacker action, access requirement, or user interaction.
Engineers running the Linux kernel SMB client should check their systems; affected versions are not specified.