ext4: fix infinite loop when replaying fast_commit
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2 · < 907c3fe532253a6ef4eb9c4d67efb71fab58c706| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ext4: fix infinite loop when replaying fast_commit
When doing fast_commit replay an infinite loop may occur due to an uninitialized extent_status struct. ext4_ext_determine_insert_hole() does not detect the replay and calls ext4_es_find_extent_range(), which will return immediately without initializing the 'es' variable.
Because 'es' contains garbage, an integer overflow may happen causing an infinite loop in this function, easily reproducible using fstest generic/039.
This commit fixes this issue by unconditionally initializing the structure in function ext4_es_find_extent_range().
Thanks to Zhang Yi, for figuring out the real problem!
From the CVE record · Linux
The Linux kernel's ext4 fast_commit replay can enter an infinite loop because an extent_status structure is left uninitialized. This can happen during fast_commit replay; the input does not specify an attacker access requirement or user interaction.
Anyone running the Linux kernel with ext4 should check whether their kernel includes the fix; affected versions are not specified.