Skip to main content

CVE-2022-49409: Vulnerability in Linux Linux

High
VulnerabilityCVE-2022-49409cvecve-2022-49409
Published: Wed Feb 26 2025 (02/26/2025, 02:12:32 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: ext4: fix bug_on in __es_tree_search Hulk Robot reported a BUG_ON: ================================================================== kernel BUG at fs/ext4/extents_status.c:199! [...] RIP: 0010:ext4_es_end fs/ext4/extents_status.c:199 [inline] RIP: 0010:__es_tree_search+0x1e0/0x260 fs/ext4/extents_status.c:217 [...] Call Trace: ext4_es_cache_extent+0x109/0x340 fs/ext4/extents_status.c:766 ext4_cache_extents+0x239/0x2e0 fs/ext4/extents.c:561 ext4_find_extent+0x6b7/0xa20 fs/ext4/extents.c:964 ext4_ext_map_blocks+0x16b/0x4b70 fs/ext4/extents.c:4384 ext4_map_blocks+0xe26/0x19f0 fs/ext4/inode.c:567 ext4_getblk+0x320/0x4c0 fs/ext4/inode.c:980 ext4_bread+0x2d/0x170 fs/ext4/inode.c:1031 ext4_quota_read+0x248/0x320 fs/ext4/super.c:6257 v2_read_header+0x78/0x110 fs/quota/quota_v2.c:63 v2_check_quota_file+0x76/0x230 fs/quota/quota_v2.c:82 vfs_load_quota_inode+0x5d1/0x1530 fs/quota/dquot.c:2368 dquot_enable+0x28a/0x330 fs/quota/dquot.c:2490 ext4_quota_enable fs/ext4/super.c:6137 [inline] ext4_enable_quotas+0x5d7/0x960 fs/ext4/super.c:6163 ext4_fill_super+0xa7c9/0xdc00 fs/ext4/super.c:4754 mount_bdev+0x2e9/0x3b0 fs/super.c:1158 mount_fs+0x4b/0x1e4 fs/super.c:1261 [...] ================================================================== Above issue may happen as follows: ------------------------------------- ext4_fill_super ext4_enable_quotas ext4_quota_enable ext4_iget __ext4_iget ext4_ext_check_inode ext4_ext_check __ext4_ext_check ext4_valid_extent_entries Check for overlapping extents does't take effect dquot_enable vfs_load_quota_inode v2_check_quota_file v2_read_header ext4_quota_read ext4_bread ext4_getblk ext4_map_blocks ext4_ext_map_blocks ext4_find_extent ext4_cache_extents ext4_es_cache_extent ext4_es_cache_extent __es_tree_search ext4_es_end BUG_ON(es->es_lblk + es->es_len < es->es_lblk) The error ext4 extents is as follows: 0af3 0300 0400 0000 00000000 extent_header 00000000 0100 0000 12000000 extent1 00000000 0100 0000 18000000 extent2 02000000 0400 0000 14000000 extent3 In the ext4_valid_extent_entries function, if prev is 0, no error is returned even if lblock<=prev. This was intended to skip the check on the first extent, but in the error image above, prev=0+1-1=0 when checking the second extent, so even though lblock<=prev, the function does not return an error. As a result, bug_ON occurs in __es_tree_search and the system panics. To solve this problem, we only need to check that: 1. The lblock of the first extent is not less than 0. 2. The lblock of the next extent is not less than the next block of the previous extent. The same applies to extent_idx.

AI-Powered Analysis

AILast updated: 06/28/2025, 00:40:49 UTC

Technical Analysis

CVE-2022-49409 is a vulnerability identified in the Linux kernel's ext4 filesystem implementation, specifically related to the handling of extents within the ext4 extents status tree. The flaw arises from improper validation of extent entries in the ext4_valid_extent_entries function. Extents are data structures used by ext4 to efficiently map file data blocks. The vulnerability occurs because the check for overlapping extents does not correctly apply to the second and subsequent extents due to a logic error where the 'prev' variable is zeroed, causing the function to skip necessary validation. This leads to a situation where extents can overlap or be out of order without triggering an error. When the kernel subsequently processes these malformed extents in the __es_tree_search function, it triggers a BUG_ON condition, which is a kernel panic assertion designed to catch critical errors. This results in a system crash (kernel panic), causing a denial of service (DoS). The issue manifests during filesystem mount operations or quota enabling, as the ext4_fill_super function and related quota functions traverse and validate extents. The root cause is a missing check that the logical block number (lblock) of the first extent is not less than zero and that subsequent extents start after the previous extent ends. The fix involves adding these boundary checks to prevent overlapping or misordered extents. This vulnerability affects Linux kernel versions containing the specified commits and is particularly relevant to systems using ext4, which is the default filesystem in many Linux distributions. There are no known exploits in the wild, and no CVSS score has been assigned yet.

Potential Impact

For European organizations, the impact of CVE-2022-49409 can be significant, especially for those relying heavily on Linux servers with ext4 filesystems. The vulnerability can cause kernel panics leading to system crashes and denial of service, which can disrupt critical services, data processing, and operations. This is particularly concerning for infrastructure providers, cloud services, web hosting, and enterprises running production workloads on Linux. The DoS condition could be triggered remotely if an attacker can manipulate filesystem metadata or locally if malicious or corrupted filesystems are mounted. Although no direct code execution or privilege escalation is indicated, the availability impact alone can cause operational downtime, data unavailability, and potential cascading failures in distributed systems. Additionally, systems that enable quotas on ext4 filesystems are also at risk during quota operations. The lack of known exploits reduces immediate risk, but the vulnerability's presence in widely deployed Linux kernels means that attackers could develop exploits in the future. European organizations with compliance requirements for uptime and data integrity must prioritize remediation to avoid service interruptions and potential reputational damage.

Mitigation Recommendations

To mitigate CVE-2022-49409, organizations should: 1) Apply the latest Linux kernel patches that address this vulnerability as soon as they become available from trusted Linux distribution vendors or kernel maintainers. 2) For environments where immediate patching is not feasible, avoid mounting untrusted or potentially corrupted ext4 filesystems and disable quota features on ext4 filesystems if not required, as the vulnerability is triggered during quota enabling. 3) Implement filesystem integrity monitoring and regular backups to detect and recover from filesystem corruption or crashes. 4) Use kernel crash dump and monitoring tools to detect and analyze kernel panics related to ext4, enabling faster incident response. 5) Limit access to systems that can mount filesystems or enable quotas to trusted administrators only, reducing the risk of malicious manipulation. 6) In virtualized or containerized environments, isolate workloads and limit exposure of ext4 mounts to reduce attack surface. 7) Monitor security advisories from Linux distributions and maintain an up-to-date inventory of kernel versions deployed across infrastructure to prioritize patching efforts.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2025-02-26T02:08:31.567Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9820c4522896dcbdd687

Added to database: 5/21/2025, 9:08:48 AM

Last enriched: 6/28/2025, 12:40:49 AM

Last updated: 7/25/2025, 7:55:52 AM

Views: 11

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats