CVE-2022-50546
Description
An uninitialized variable flaw was found in the Linux kernel's ext4 filesystem in the inode eviction path. A local user can trigger this issue by creating filesystem operations that cause inode allocation to fail before the i_flags field is initialized, followed by inode cleanup that attempts to read the uninitialized field. This causes the kernel to access uninitialized memory, resulting in unpredictable behavior and denial of service through a kernel crash.
Statement
The ext4_alloc_inode function allocates memory for new inodes but fails to initialize the ei->i_flags field. When __ext4_new_inode encounters an error before setting i_flags and calls iput to clean up, the subsequent ext4_evict_inode function attempts to read the uninitialized i_flags value. This accesses undefined memory contents, triggering KMSAN (Kernel Memory Sanitizer) warnings and potentially causing kernel crashes or unpredictable behavior. The issue occurs during normal filesystem operations like mkdir or mknod when inode allocation fails partway through, which can happen under memory pressure or filesystem corruption. Any local user performing filesystem operations on ext4 volumes can potentially trigger this condition.
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).
CVSS v3 Score Breakdown
| Red Hat | NVD | cve.org | |
|---|---|---|---|
| Base Score | 5.5 | 7.8 | N/A |
| Attack Vector | Local | Local | N/A |
| Attack Complexity | Low | Low | N/A |
| Privileges Required | Low | Low | N/A |
| User Interaction | None | None | N/A |
| Scope | Unchanged | Unchanged | N/A |
| Confidentiality | None | High | N/A |
| Integrity Impact | None | High | N/A |
| Availability Impact | High | High | N/A |
Vector
Red Hat: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
NVD: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/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
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.