CVE-2022-50638
BaseFortify
Publication date: 2025-12-09
Last updated on: 2025-12-09
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 a bug in the Linux kernel's ext4 filesystem code. It occurs due to improper handling of the boot loader inode (inode 5) during an ioctl operation that swaps inode 5 and inode 12. Inode 5 can have incorrect mode and disordered extents, and its link count is set to 1, which allows bypassing extent checks. When the extents are swapped to inode 12 and accessed (e.g., by running 'cat'), a kernel BUG is triggered because of the invalid extents. The issue arises because the boot loader inode is not properly initialized, leading to a BUG_ON condition in the ext4 code.
How can this vulnerability impact me? :
This vulnerability can cause a kernel crash (BUG) when accessing certain inodes in the ext4 filesystem, potentially leading to system instability or denial of service. Specifically, it can cause the kernel to panic or stop functioning correctly when the corrupted inode extents are accessed, which may disrupt normal system operations.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability manifests as a kernel BUG triggered by improper ext4 inode handling, often seen when running commands that access ext4 inodes such as 'cat' on inode 12 after an ioctl operation. Detection can involve monitoring kernel logs for BUG_ON messages related to ext4 extents, specifically messages like 'kernel BUG at fs/ext4/extents_status.c:203!'. You can check kernel logs using commands like 'dmesg | grep ext4' or 'journalctl -k | grep ext4'. Additionally, reproducing the issue by running 'cat' on inode 12 after the ioctl operation that swaps boot loader inodes may trigger the bug if the system is vulnerable.
What immediate steps should I take to mitigate this vulnerability?
To mitigate this vulnerability, update the Linux kernel to a version where the ext4 bug related to boot loader inode initialization is fixed. The fix involves properly initializing the boot loader inode to prevent triggering the BUG_ON condition. Until an update is applied, avoid executing ioctl commands that swap boot loader inodes or accessing inode 12 in a way that triggers the bug. Monitoring for kernel BUG messages and avoiding operations that manipulate the boot loader inode can reduce risk.