CVE-2021-47406: ext4: add error checking to ext4_ext_replay_set_iblocks()
In the Linux kernel, the following vulnerability has been resolved:
ext4: add error checking to ext4_ext_replay_set_iblocks()
If the call to ext4_map_blocks() fails due to an corrupted file
system, ext4_ext_replay_set_iblocks() can get stuck in an infinite
loop. This could be reproduced by running generic/526 with a file
system that has inline_data and fast_commit enabled. The system will
repeatedly log to the console:
EXT4-fs warning (device dm-3): ext4_block_to_path:105: block 1074800922 > max in inode 131076
and the stack that it gets stuck in is:
ext4_block_to_path+0xe3/0x130
ext4_ind_map_blocks+0x93/0x690
ext4_map_blocks+0x100/0x660
skip_hole+0x47/0x70
ext4_ext_replay_set_iblocks+0x223/0x440
ext4_fc_replay_inode+0x29e/0x3b0
ext4_fc_replay+0x278/0x550
do_one_pass+0x646/0xc10
jbd2_journal_recover+0x14a/0x270
jbd2_journal_load+0xc4/0x150
ext4_load_journal+0x1f3/0x490
ext4_fill_super+0x22d4/0x2c00
With this patch, generic/526 still fails, but system is no longer
locking up in a tight loop. It's likely the root casue is that
fast_commit replay is corrupting file systems with inline_data, and we
probably need to add better error handling in the fast commit replay
code path beyond what is done here, which essentially just breaks the
infinite loop without reporting the to the higher levels of the code.
Security readout for executives and security teams
Plain-English summary
This is a Linux kernel ext4 denial-of-service issue. Under specific ext4 fast-commit replay conditions on a corrupted filesystem, the kernel can enter a tight loop and lock up, affecting availability rather than data confidentiality.
Executive priority
Treat as a targeted availability risk, not a remote compromise issue. Patch during normal kernel maintenance, but prioritize critical Linux systems where local users or corrupted ext4 media could cause service disruption.
Technical view
The flaw is in ext4_ext_replay_set_iblocks(). When ext4_map_blocks() fails during fast-commit replay, error handling was insufficient, allowing an infinite loop. The reported trigger involved ext4 filesystems with inline_data and fast_commit enabled during generic/526 testing.
Likely exposure
Exposure is most relevant to Linux systems running affected kernel versions that mount ext4 filesystems using fast_commit and inline_data. The CVE source lists Linux kernel 5.10, 5.10.71, 5.14.10, and 5.15, but affected-version formatting is incomplete.
Exploitation context
The CVSS vector is local, low complexity, and requires low privileges. The source bundle does not show CISA KEV listing or other evidence of active exploitation. The documented impact is high availability loss from kernel lockup behavior.
Researcher notes
Evidence points to a narrow ext4 fast-commit replay error-handling bug. The upstream note says the patch breaks the infinite loop, while broader fast-commit replay corruption handling may still need improvement. Affected version metadata is not fully clean.
Mitigation direction
Update to a vendor kernel containing the referenced upstream stable fixes.
Prioritize systems using ext4 with fast_commit and inline_data features.
Check Linux distribution advisories for exact fixed package versions.
Plan reboot windows where kernel updates require restart.
Monitor for recurring ext4_block_to_path warnings on affected hosts.
Validation and detection
Inventory Linux kernel versions across servers and endpoints.
Identify systems mounting ext4 filesystems with fast_commit and inline_data.
Compare installed kernels with distribution advisories and stable fix commits.
Review logs for repeated ext4_block_to_path warnings or mount-time recovery loops.
Confirm updated kernels are running after maintenance reboots.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2021-47406 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.