CVE-2024-50120 smb: client: Handle kstrdup failures for passwords
A missing null check in the Linux kernel SMB client can cause a crash if password duplication fails, leading to denial of service.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-50120?
CVE-2024-50120 is a medium-severity vulnerability in Linux kernel, published on 5 Nov 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official 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.
Which versions are affected by CVE-2024-50120?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2024-50120?
Apply the vendor's patch.
Is CVE-2024-50120 being exploited?
There is no known exploitation of CVE-2024-50120 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as AZL-52511, BELL-CVE-2024-50120, DEBIAN-CVE-2024-50120, GHSA-g679-7h82-27hc, UBUNTU-CVE-2024-50120.