CVE-2024-50152 smb: client: fix possible double free in smb2_set_ea()
A double free vulnerability in the Linux kernel SMB client allows attackers to cause denial of service or potentially execute arbitrary code.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-50152?
CVE-2024-50152 is a critical use after free vulnerability in Linux kernel, published on 7 Nov 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
smb: client: fix possible double free in smb2_set_ea()
Clang static checker(scan-build) warning: fs/smb/client/smb2ops.c:1304:2: Attempt to free released memory. 1304 | kfree(ea); | ^~~~~~~~~
There is a double free in such case: 'ea is initialized to NULL' -> 'first successful memory allocation for ea' -> 'something failed, goto sea_exit' -> 'first memory release for ea' -> 'goto replay_again' -> 'second goto sea_exit before allocate memory for ea' -> 'second memory release for ea resulted in double free'.
Re-initialie 'ea' to NULL near to the replay_again label, it can fix this double free problem.
Weakness: CWE-415
Which versions are affected by CVE-2024-50152?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2024-50152?
Apply the vendor's patch.
Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.
Is CVE-2024-50152 being exploited?
There is no known exploitation of CVE-2024-50152 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as AZL-52926, BELL-CVE-2024-50152, DEBIAN-CVE-2024-50152, GHSA-jfp4-pv53-rv88, UBUNTU-CVE-2024-50152.