What’s Vulnerable › Vulnerabilities
CVE-2024-50087: btrfs: fix uninitialized pointer free on read_alloc_one_name() error
- Severity: medium (CVSS 5.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.2% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2024-10-29 · updated 2026-08-04
- Weakness: CWE-824
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").
Affected products
- Linux kernel: from 6.1.57 before 6.1.114; from 6.2 before 6.6.58; from 6.7 before 6.11.5; 6.12-rc1, 6.12-rc2, 6.12-rc3 — fixed in 6.1.114, 6.11.5, 6.6.58
How to fix
Upgrade to a fixed version: Linux kernel 6.1.114, 6.11.5, 6.6.58. Check the vendor advisory for mitigations.
References
- https://git.kernel.org/stable/c/1ec28de5e476913ae51f909660b4447eddb28838
- https://git.kernel.org/stable/c/2ab5e243c2266c841e0f6904fad1514b18eaf510
- https://git.kernel.org/stable/c/7fc7c47b9ba0cf2d192f2117a64b24881b0b577f
- https://git.kernel.org/stable/c/b37de9491f140a0ff125c27dd1050185c3accbc1
- https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html
Get alerted when CVE-2024-50087 or the next vulnerability affects your stack