CVE-2024-56780: quota: flush quota_release_work upon quota writeback
In the Linux kernel, the following vulnerability has been resolved:
quota: flush quotareleasework upon quota writeback
One of the paths quota writeback is called from is:
freezesuper() syncfilesystem() ext4syncfs() dquotwritebackdquots()
Since we currently don't always flush the quotareleasework queue in this path, we can end up with the following race:
1. dquot are added to releasingdquots list during regular operations. 2. FS Freeze starts, however, this does not flush the quotareleasework queue. 3. Freeze completes. 4. Kernel eventually tries to flush the workqueue while FS is frozen which hits a WARNON since transaction gets started during frozen state:
ext4journalcheckstart+0x28/0x110 [ext4] (unreliable) ext4journalstartsb+0x64/0x1c0 [ext4] ext4releasedquot+0x90/0x1d0 [ext4] quotareleaseworkfn+0x43c/0x4d0
Which is the following line:
WARNON(sb->swriters.frozen == SBFREEZECOMPLETE);
Which ultimately results in generic/390 failing due to dmesg noise. This was detected on powerpc machine 15 cores.
To avoid this, make sure to flush the workqueue during dquotwritebackdquots() so we dont have any pending workitems after freeze.
Other sources
This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.
— Launchpad
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.27-1 - Upgrade
Upgrade
debian/linux-6.1to a version that resolves this vulnerability.Fixed in 6.1.129-1~deb11u1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 5.15.176.3-1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 6.6.64.2-1 - Configuration
Apply the kernel fix described as: "quota: flush quota_release_work upon quota writeback" so that the quota_release_work queue is flushed during dquot_writeback_dquots(), preventing pending workitems after freeze and avoiding the WARN_ON at WARN_ON(sb->s_writers.frozen == SB_FREEZE_COMPLETE).
Linux kernel quota (dquot_writeback_dquots()/freeze_super() path) flush quota_release_work workqueue during quota writeback = Ensure quota_release_work queue is flushed during dquot_writeback_dquots() during filesystem freezing to avoid WARN_ON during SB_FREEZE_COMPLETE state
Event History
Frequently Asked Questions
What is the severity of CVE-2024-56780?
CVE-2024-56780 is categorized with a high severity rating due to its potential impact on system stability and security.
How do I fix CVE-2024-56780?
To fix CVE-2024-56780, you should upgrade to a patched version of the Linux kernel that addresses this vulnerability.
What versions of Linux kernel are affected by CVE-2024-56780?
CVE-2024-56780 affects multiple versions of the Linux kernel, specifically those between 4.19.295 and 4.20, and also various ranges starting from 5.4.257 to 6.12.4.
What type of vulnerability is CVE-2024-56780 classified as?
CVE-2024-56780 is classified as a kernel vulnerability associated with the quota writeback functionality in the Linux kernel.
Is there any workaround for CVE-2024-56780 before applying the patch?
Currently, there are no known workarounds for CVE-2024-56780, so upgrading to a secure version is essential.