# CVE-2024-50087: btrfs: fix uninitialized pointer free on read_alloc_one_name() error

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.21%, higher than 12% of CVEs (2026-12-01)
- Published: 2024-10-29T00:50:30.313Z
- Modified: 2026-08-05T11:41:32.766Z
- Weaknesses: CWE-824
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## 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").

(As written by CVE List.)

## Affected

- Linux Linux: from 1cf474cd474bc5d3ef63086ffd009a87a5b7bb2e before b37de9491f140a0ff125c27dd1050185c3accbc1; from e43eec81c5167b655b72c781b0e75e62a05e415e before 7fc7c47b9ba0cf2d192f2117a64b24881b0b577f; from e43eec81c5167b655b72c781b0e75e62a05e415e before 1ec28de5e476913ae51f909660b4447eddb28838; from e43eec81c5167b655b72c781b0e75e62a05e415e before 2ab5e243c2266c841e0f6904fad1514b18eaf510; from 6.1.57 before 6.1.114; 6.2 (not affected: before 6.2; from 6.1.114 up to 6.1.*; from 6.6.58 up to 6.6.*; from 6.11.5 up to 6.11.*; from 6.12 up to *)
- linux 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

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- CISA-ADP: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/b37de9491f140a0ff125c27dd1050185c3accbc1> (patch)
- <https://git.kernel.org/stable/c/7fc7c47b9ba0cf2d192f2117a64b24881b0b577f> (patch)
- <https://git.kernel.org/stable/c/1ec28de5e476913ae51f909660b4447eddb28838> (patch)
- <https://git.kernel.org/stable/c/2ab5e243c2266c841e0f6904fad1514b18eaf510> (patch)
- <https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html>

## Sources

- CVE List: [CVE-2024-50087](https://www.cve.org/CVERecord?id=CVE-2024-50087), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2024-50087](https://nvd.nist.gov/vuln/detail/CVE-2024-50087), Public domain, modified 2026-08-04

---

Page: https://cve.day/CVE-2024-50087 · Whole record: https://cve.day/CVE-2024-50087.json · Rebuilt by cve.day 2026-11-25T22:58:47.451Z
