CVE-2024-49960 ext4: fix timer use-after-free on failed mount

High 7.8 Published Updated

A use-after-free vulnerability in the Linux kernel ext4 filesystem allows a local attacker to cause a denial of service via a failed mount operation.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2024-49960?

CVE-2024-49960 is a high-severity use after free vulnerability in Debian Debian Linux, published on 21 Oct 2024. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

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.

Weakness: CWE-416

Which versions are affected by CVE-2024-49960?

It affects 2 products.

Products include Debian Debian Linux, Linux kernel.

How do I fix CVE-2024-49960?

Apply the vendor's patch.

Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.

Is CVE-2024-49960 being exploited?

There is no known exploitation of CVE-2024-49960 in the wild and no public exploit code.

All Debian Debian Linux vulnerabilities

Sources

Also known as AZL-51763, BELL-CVE-2024-49960, DEBIAN-CVE-2024-49960, GHSA-xrhf-cccw-cpm8, ROOT-OS-UBUNTU-2204-CVE-2024-49960, UBUNTU-CVE-2024-49960.

Is CVE-2024-49960 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free