CVE-2022-50766

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.

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

The following CVSS metrics and score provided are preliminary and subject to review.

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score5.5N/AN/A
Attack VectorLocalN/AN/A
Attack ComplexityLowN/AN/A
Privileges RequiredLowN/AN/A
User InteractionNoneN/AN/A
ScopeUnchangedN/AN/A
ConfidentialityNoneN/AN/A
Integrity ImpactNoneN/AN/A
Availability ImpactHighN/AN/A

Vector

Red Hat: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Understanding the Weakness (CWE)

Confidentiality

Technical Impact: Read Memory; Read Application Data

When reusing a resource such as memory or a program variable, the original contents of that resource may not be cleared before it is sent to an untrusted party.

Availability

Technical Impact: DoS: Crash, Exit, or Restart

The uninitialized resource may contain values that cause program flow to change in ways that the programmer did not intend.

Frequently Asked Questions

Want to get errata notifications? Sign up here.