CVE-2024-50087 btrfs: fix uninitialized pointer free on read_alloc_one_name() error
A local attacker can trigger a kernel crash by exploiting an uninitialized pointer free in the btrfs filesystem code.
- 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-50087?
CVE-2024-50087 is a high-severity vulnerability in Linux kernel, published on 29 Oct 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:
btrfs: fix uninitialized pointer free on read_alloc_one_name() error
The function read_alloc_one_name() does not initialize the name field of the passed fscrypt_str struct if kmalloc fails to allocate the corresponding buffer. Thus, it is not guaranteed that fscrypt_str.name is initialized when freeing it.
This is a follow-up to the linked patch that fixes the remaining instances of the bug introduced by commit e43eec81c516 ("btrfs: use struct qstr instead of name and namelen pairs").
Weakness: CWE-824
Which versions are affected by CVE-2024-50087?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2024-50087?
Apply the vendor's patch.
Is CVE-2024-50087 being exploited?
There is no known exploitation of CVE-2024-50087 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as AZL-51915, BELL-CVE-2024-50087, DEBIAN-CVE-2024-50087, GHSA-cxc4-ppv4-gfgj, UBUNTU-CVE-2024-50087.