CVE-2022-50782
Kernel NULL Pointer Dereference in ext4 Quota Inode Handling
Publication date: 2025-12-24
Last updated on: 2025-12-24
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, specifically in the __es_tree_search function. It occurs due to a bad quota inode (inode number 5, which is the EXT4_BOOT_LOADER_INO) that contains incorrect mode and disordered extents. Because the inode check can be bypassed for this special inode, the extents are not properly validated, leading to a kernel BUG triggered by a BUG_ON macro in the __es_tree_search function. This can cause the kernel to crash or behave unexpectedly during filesystem operations involving quotas.
How can this vulnerability impact me? :
This vulnerability can cause the Linux kernel to crash or experience a kernel BUG when mounting or working with ext4 filesystems that have bad quota inodes. This can lead to system instability, denial of service, or data access issues related to the ext4 filesystem quota management.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability manifests as a kernel BUG related to ext4 filesystem quota inode handling, causing a crash with a message similar to 'kernel BUG at fs/ext4/extents_status.c:202!'. Detection involves monitoring system logs (e.g., dmesg or /var/log/kern.log) for such kernel BUG messages referencing ext4 and __es_tree_search. Specific commands to detect this include: 'dmesg | grep ext4' or 'journalctl -k | grep ext4' to find related kernel errors. Additionally, checking for ext4 filesystem mounts and quota inode inconsistencies might help, but no specific commands are provided in the context.
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation involves updating the Linux kernel to a version where this ext4 quota inode bug is fixed. Since the issue is caused by improper checking of bad inodes during quota setup, applying the patch that adds the check in vfs_setup_quota_inode() will prevent the BUG_ON from triggering. Until an update is applied, avoiding mounting ext4 filesystems with quota enabled on affected kernels may reduce risk. No specific mitigation commands or steps are provided in the context.