CVE-2024-50087

btrfs: fix uninitialized pointer free on read_alloc_one_name() error

State
Published
Severity
7.8 High
Published
Oct 29, 2024
Updated
Aug 5, 2026
Reserved
Oct 21, 2024

Read the record on cve.org

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

Scores

CVSSScoreVectorSource
3.17.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HLinux
3.15.5 MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HCISA-ADP

Weaknesses

  • CWE-824 Access of Uninitialized Pointer

Affected Products

ProductVersions
LinuxLinux
  • 1cf474cd474bc5d3ef63086ffd009a87a5b7bb2e to before b37de9491f140a0ff125c27dd1050185c3accbc1Affected
  • e43eec81c5167b655b72c781b0e75e62a05e415e to before 7fc7c47b9ba0cf2d192f2117a64b24881b0b577fAffected
  • e43eec81c5167b655b72c781b0e75e62a05e415e to before 1ec28de5e476913ae51f909660b4447eddb28838Affected
  • e43eec81c5167b655b72c781b0e75e62a05e415e to before 2ab5e243c2266c841e0f6904fad1514b18eaf510Affected
  • 6.1.57 to before 6.1.114Affected
LinuxLinux
  • 6.2Affected
  • before 6.2Not affected
  • 6.1.114 through 6.1.*Not affected
  • 6.6.58 through 6.6.*Not affected
  • 6.11.5 through 6.11.*Not affected
  • 6.12 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.