CVE-2026-139349: f2fs: quota: fix quota flush failure during filesystem freeze
In the Linux kernel, the following vulnerability has been resolved:
f2fs: quota: fix quota flush failure during filesystem freeze
Quota flush retries can be exhausted during filesystem freeze.
freezesuper() and the quota checkpoint may race as below.
freezesuper() f2fsckpt - downwrite(&sb->sumount) - sb->swriters.frozen = SBFREEZEPAGEFAULT - syncfilesystem() - f2fssyncfs() - f2fsissuecheckpoint() - queue CPSYNC -----------------> - blockoperations() - downreadtrylock(sumount) : fails; freeze holds write lock - quota flush retries exhausted - set CPQUOTANEEDFSCKFLAG
During the PAGEFAULT sync pass, freezesuper() holds sumount for write, but umountlockholder is not set until f2fsfreeze(). Thus quota writeback tries to acquire sumount again and can exhaust retries.
With checkpoint merge enabled, f2fsissuecheckpoint() may dispatch CPSYNC to f2fsckpt. That thread also cannot acquire the freeze lock.
Record current as umountlockholder around the VFS PAGEFAULT sync so checkpoint runs in the freeze caller and quota flush uses its existing sumount write lock.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In freeze_super(), record the current task as umount_lock_holder around the VFS PAGEFAULT sync.
Event History
Frequently Asked Questions
Which systems are affected by this issue?
Systems using the Linux kernel with an F2FS filesystem and quota handling are relevant. The failure occurs during filesystem freeze operations when quota flushing and checkpoint processing contend with the s_umount lock.
What conditions are needed to trigger the problem?
A filesystem freeze must overlap with F2FS checkpoint and quota-flush activity. Checkpoint merge can make the race more likely because a CP_SYNC checkpoint may be dispatched to a checkpoint thread that cannot acquire the freeze lock.
What is the observable impact if the race occurs?
Quota flush retries can be exhausted during the freeze, causing F2FS to set the CP_QUOTA_NEED_FSCK_FLAG. This indicates the filesystem may require an fsck check.
What should operators do if they cannot immediately deploy the fix?
Avoid or minimize filesystem freeze operations while quota writeback or checkpoint activity may be occurring, where operationally possible. If the CP_QUOTA_NEED_FSCK_FLAG is set, plan to check the affected filesystem with fsck.