CVE-2024-27392 nvme: host: fix double-free of struct nvme_id_ns in ns_update_nuse()
A double-free vulnerability in the Linux kernel NVMe host driver allows local attackers to cause a system crash via KASAN detection.
- 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-27392?
CVE-2024-27392 is a high-severity use after free vulnerability in Linux kernel, published on 1 May 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:
nvme: host: fix double-free of struct nvme_id_ns in ns_update_nuse()
When nvme_identify_ns() fails, it frees the pointer to the struct nvme_id_ns before it returns. However, ns_update_nuse() calls kfree() for the pointer even when nvme_identify_ns() fails. This results in KASAN double-free, which was observed with blktests nvme/045 with proposed patches [1] on the kernel v6.8-rc7. Fix the double-free by skipping kfree() when nvme_identify_ns() fails.
Weakness: CWE-415
Which versions are affected by CVE-2024-27392?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2024-27392?
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-27392 being exploited?
There is no known exploitation of CVE-2024-27392 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2024-27392, GHSA-5hxm-7v87-m497, UBUNTU-CVE-2024-27392.