# CVE-2024-50120: smb: client: Handle kstrdup failures for passwords

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.22%, higher than 12% of CVEs (2026-12-01)
- Published: 2024-11-05T17:10:49.887Z
- Modified: 2026-06-17T08:03:38.453Z
- Assigned by: Linux

## Description

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.

(As written by CVE List.)

## Affected

- Linux Linux: from 7e8cffa4f85e6839335d75e6b47f918d90c1d194 before 35dbac8c328d6afe937cd45ecd41d209d0b9f8b8; from c1eb537bf4560b3ad4df606c266c665624f3b502 before 35488799b0ab6e4327f82e1d9209a60805665b37; from c1eb537bf4560b3ad4df606c266c665624f3b502 before 9a5dd61151399ad5a5d69aad28ab164734c1e3bc; e78308a6dcab1e53b38b8dd952e69c515cd324d7; 2a0fc63f1f4fccfeb367d0c57b8a243cec60c26c; from 6.6.24 before 6.6.59; from 6.7.12 before 6.8; from 6.8.3 before 6.9; 6.9 (not affected: before 6.9; from 6.6.59 up to 6.6.*; from 6.11.6 up to 6.11.*; from 6.12 up to *)
- linux linux_kernel: from 6.6.24 before 6.6.59; from 6.7.12 before 6.8; from 6.8.3 before 6.11.6; 6.12

## References

- <https://git.kernel.org/stable/c/35dbac8c328d6afe937cd45ecd41d209d0b9f8b8> (patch)
- <https://git.kernel.org/stable/c/35488799b0ab6e4327f82e1d9209a60805665b37> (patch)
- <https://git.kernel.org/stable/c/9a5dd61151399ad5a5d69aad28ab164734c1e3bc> (patch)

## Sources

- CVE List: [CVE-2024-50120](https://www.cve.org/CVERecord?id=CVE-2024-50120), CVE Terms of Use, modified 2026-05-23
- NVD: [CVE-2024-50120](https://nvd.nist.gov/vuln/detail/CVE-2024-50120), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-50120 · Whole record: https://cve.day/CVE-2024-50120.json · Rebuilt by cve.day 2026-11-25T22:58:47.785Z
