CVE-2022-50845
Inode Leak Vulnerability in Linux ext4 Causes Filesystem Errors
Publication date: 2025-12-30
Last updated on: 2025-12-30
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| linux | linux_kernel | * |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-UNKNOWN |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability is an inode leak in the ext4 filesystem of the Linux kernel. Specifically, it occurs in the function ext4_xattr_inode_create() when setting extended attributes (setxattr) with an injected fault. If the function ext4_mark_inode_dirty() fails, the inode's link count (i_nlink) is not properly dropped, leading to an inode leak. This means that some inodes remain unattached and unused, causing filesystem errors.
How can this vulnerability impact me? :
The inode leak can cause filesystem inconsistencies and errors, as shown by the output of fsck.ext4 indicating unattached inodes and warnings about filesystem errors. This can lead to corrupted filesystem metadata, potential data loss, and degraded filesystem integrity.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by checking for inode leaks or filesystem errors related to ext4. You can use the command `fsck.ext4 -fn /dev/sda` to perform a filesystem check in a non-destructive, read-only mode. If the vulnerability is present, you may see warnings about unattached or zero-length inodes, such as 'Unattached zero-length inode' or 'Filesystem still has errors'.
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation involves running filesystem checks and repairs using tools like `fsck.ext4` to identify and fix inode leaks. Additionally, updating the Linux kernel to a version where this ext4 inode leak issue in `ext4_xattr_inode_create()` is fixed is recommended to prevent the vulnerability from being exploited.