ext4: fix timer use-after-free on failed mount
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 618f003199c6188e01472b03cdbba227f1dc5f24 · < b85569585d0154d4db1e4f9e3e6a4731d407feb0| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ext4: fix timer use-after-free on failed mount
Syzbot has found an ODEBUG bug in ext4_fill_super
The del_timer_sync function cancels the s_err_report timer, which reminds about filesystem errors daily. We should guarantee the timer is no longer active before kfree(sbi).
When filesystem mounting fails, the flow goes to failed_mount3, where an error occurs when ext4_stop_mmpd is called, causing a read I/O failure. This triggers the ext4_handle_error function that ultimately re-arms the timer, leaving the s_err_report timer active before kfree(sbi) is called.
Fix the issue by canceling the s_err_report timer after calling ext4_stop_mmpd.
From the CVE record · Linux
The Linux kernel's ext4 filesystem has a timer use-after-free during a failed mount. If stopping the MMP daemon causes a read I/O failure, error handling can re-arm a timer before its associated memory is freed. The input does not specify an attacker path, authentication requirements, or user interaction.
Engineers running Linux kernels with ext4 should check whether their kernel includes the fix; affected versions are not specified.