// For flags

CVE-2021-47406

ext4: add error checking to ext4_ext_replay_set_iblocks()

Severity Score

"-"
*CVSS v-

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

Track
*SSVC
Descriptions

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.

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: ext4: agregue verificación de errores a ext4_ext_replay_set_iblocks(). Si la llamada a ext4_map_blocks() falla debido a un sistema de archivos dañado, ext4_ext_replay_set_iblocks() puede quedarse atascado en un bucle infinito. Esto podría reproducirse ejecutando generic/526 con un sistema de archivos que tenga inline_data y fast_commit habilitados. El sistema iniciará sesión repetidamente en la consola: Advertencia EXT4-fs (dispositivo dm-3): ext4_block_to_path:105: bloque 1074800922 > max en el inodo 131076 y la pila en la que se atasca es: 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 Con este parche, generic/526 todavía falla, pero el sistema ya no se bloquea en un bucle cerrado. Es probable que la causa raíz sea que la reproducción fast_commit esté corrompiendo los sistemas de archivos con inline_data, y probablemente necesitemos agregar un mejor manejo de errores en la ruta del código de reproducción de confirmación rápida más allá de lo que se hace aquí, lo que esencialmente simplemente rompe el bucle infinito sin informar al niveles superiores del código.

*Credits: N/A
CVSS Scores
Attack Vector
-
Attack Complexity
-
Privileges Required
-
User Interaction
-
Scope
-
Confidentiality
-
Integrity
-
Availability
-
* Common Vulnerability Scoring System
SSVC
  • Decision:Track
Exploitation
None
Automatable
No
Tech. Impact
Partial
* Organization's Worst-case Scenario
Timeline
  • 2024-05-21 CVE Reserved
  • 2024-05-21 CVE Published
  • 2024-05-22 EPSS Updated
  • 2024-08-04 CVE Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 5.10 < 5.10.71
Search vendor "Linux" for product "Linux Kernel" and version " >= 5.10 < 5.10.71"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 5.10 < 5.14.10
Search vendor "Linux" for product "Linux Kernel" and version " >= 5.10 < 5.14.10"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 5.10 < 5.15
Search vendor "Linux" for product "Linux Kernel" and version " >= 5.10 < 5.15"
en
Affected