CVE-2022-50766
kernel: btrfs: set generation before calling btrfs_clean_tree_block in btrfs_init_new_buffer
Severity
LowRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · December 24, 2025
Updated · June 30, 2026
Description
A use of uninitialized memory was found in the Linux kernel's btrfs filesystem. In btrfs_init_new_buffer(), btrfs_set_header_generation() was moved after btrfs_clean_tree_block() during code refactoring. However, btrfs_clean_tree_block() calls btrfs_header_generation() which reads the generation value before it is initialized, causing use of uninitialized data.
Statement
This flaw was discovered by syzbot and affects btrfs filesystems during extent buffer initialization. The uninitialized value read occurs in the b-tree block cleaning path. While this primarily causes undefined behavior from reading uninitialized memory, it could potentially lead to incorrect decisions based on garbage values.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
No mitigation is specified in collected source.
CVSS / CWE
CVSS 3.1 · 5.5CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
CWE-908 · Use of Uninitialized Resource