Look up another CVE · open CVE-2025-23132 in the interactive tracker
CVE-2025-23132
f2fs: quota: fix to avoid warning in dquot_writeback_dquots()
Published 2025-04-16 (18 months ago) by the Linux kernel CNA. Subsystem fs/f2fs. Debian urgency: not yet assigned.
What to do, per Debian release
Debian's own status for CVE-2025-23132 in every release this site tracks, and what each one means in practice. Every status below is the one the Debian Security Team publishes for this CVE. source
| Release | Status | Version | What this means |
|---|---|---|---|
| Debian 12bookworm | vulnerable | 6.1.190-1 | No fix published anywhere yet, neither in Debian nor upstream for the series bookworm tracks. Watch the Debian tracker page for this CVE. Advisories for bookworm have historically landed a median of 23 days after publication. |
| Debian 13trixie | vulnerable | 6.12.113-1 | No fix published anywhere yet, neither in Debian nor upstream for the series trixie tracks. Watch the Debian tracker page for this CVE. Advisories for trixie have historically landed a median of 11 days after publication. |
| Debian 14forky | fixed | 6.16.3-1 | Update the kernel and reboot. Fixed in 6.16.3-1. A running kernel keeps the old code until the machine restarts. |
| Debian unstablesid | fixed | 6.16.3-1 | Update the kernel and reboot. Fixed in 6.16.3-1. A running kernel keeps the old code until the machine restarts. |
The vulnerability
What the bug is
F2FS-fs (dm-59): checkpoint=enable has some unwritten data. ------------[ cut here ]------------ WARNING: CPU: 6 PID: 8013 at fs/quota/dquot.c:691 dquot_writeback_dquots+0x2fc/0x308 pc : dquot_writeback_dquots+0x2fc/0x308 lr : f2fs_quota_sync+0xcc/0x1c4 Call trace: dquot_writeback_dquots+0x2fc/0x308 f2fs_quota_sync+0xcc/0x1c4 f2fs_write_checkpoint+0x3d4/0x9b0 f2fs_issue_checkpoint+0x1bc/0x2c0 f2fs_sync_fs+0x54/0x150 f2fs_do_sync_file+0x2f8/0x814 __f2fs_ioctl+0x1960/0x3244 f2fs_ioctl+0x54/0xe0 __arm64_sys_ioctl+0xa8/0xe4 invoke_syscall+0x58/0x114 checkpoint and f2fs_remount may race as below, resulting triggering warning in dquot_writeback_dquots(). atomic write remount - do_remount - down_write(&sb->s_umount); - f2fs_remount - ioctl - f2fs_do_sync_file - f2fs_sync_fs - f2fs_write_checkpoint - block_operations - locked = down_read_trylock(&sbi->sb->s_umount) : fail to lock due to the write lock was held by remount - up_write(&sb->s_umount); - f2fs_quota_sync - dquot_writeback_dquots - WARN_ON_ONCE(!rwsem_is_locked(&sb->s_umount)) : trigger warning because s_umount lock was unlocked by remount If checkpoint comes from mount/umount/remount/freeze/quotactl, caller of checkpoint has already held s_umount lock, calling dquot_writeback_dquots() in the context should be safe. So let's record task to sbi->umount_lock_holder, so that checkpoint can know whether the lock has held in the context or not by checking current w/ it. In addition, in order to not misrepresent caller of checkpoint, we should not allow to trigger async checkpoint for those callers: mount/umount/remount/ freeze/quotactl.
Where it lives
The fix touches these files. If the subsystem is one you do not use, the practical exposure is lower, though the package is still the vulnerable one.
fs/f2fs/checkpoint.c
fs/f2fs/f2fs.h
fs/f2fs/super.c
- What this is
- F2FS FILE SYSTEMMAINTAINERS section matched on fs/f2fs/ · linux-f2fs-devel@lists.sourceforge.net · Maintained
- Kernel module
- f2fs
Check it on the machine
grep -w CONFIG_F2FS_FS /boot/config-$(uname -r)Reads the booted kernel's own configuration, on the machine and nowhere else. =y is built in, =m is a module, and an is not set line means the code is not there.
lsmod | grep -w f2fsPrints a line if that module is loaded right now, and nothing if it is not. One that is not loaded can still be loaded later by anything that needs it.
Show whether Debian builds this, per release
Debian builds this, but not on every flavour. At least one release below builds the code on some of its kernel flavours and not on others, so the answer depends on the architecture and flavour installed.
- bookworm, trixie, forky, sidMnot built on amd64/cloud-amd64, arm64/cloud-arm64
- M
- a module where it is built at all; some flavours do not build it
- Build switch
- CONFIG_F2FS_FS
From the configuration Debian publishes for every kernel flavour it builds. It covers only the architectures Debian ships a linux-config package for, and nothing about a kernel you built yourself. Debian's own status above stays authoritative about the source package.MAINTAINERS kbuild Makefiles Debian linux-config packages
Signals
- Published
- 2025-04-16 (18 months ago)source
- CVSS
- 7.0 high
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:Hsource recompute it - Attack vector
- local (AV:L)source
- EPSS
- 0.26%, higher than 16.7% of all CVEssource
- CISA KEV
- not listedthe KEV catalogue
- Debian urgency
- not yet assignedsource
- Subsystem
- fs/f2fs
Upstream fixes
The versions the CNA records as introducing and fixing this, and the commit for each. source
| Introduced | Fixed in | Commit |
|---|---|---|
| 4.20 | 6.14.2 | d7acf0a6c87a |
| 4.20 | 6.15 | eb85c2410d6f |
Why the CNA scored it this way
Quoted from the kernel CNA's own scoring file, word for word. A highlighted metric carries the most severe value CVSS v3.1 defines for it, which is what pushes the score up. source
- AV:LAttack vector, local
- The vulnerable path is entered purely through local syscalls against a mounted f2fs volume — `syncfs()`, `fsync()` or `__f2fs_ioctl()` reaching `f2fs_sync_fs` → `f2fs_issue_checkpoint` → `block_operations`. There is no remote or network-facing route into f2fs checkpointing.
- AC:HAttack complexity, high
- The attacker can spam the checkpoint side at will, but `down_read_trylock(&sb->s_umount)` only fails while a *writer* holds the lock, and every writer (mount/remount/umount/freeze/quotaon-off/shutdown ioctl) is a CAP_SYS_ADMIN operation the unprivileged attacker cannot initiate; the lock must additionally be released or be tearing down quota within the narrow window before `dquot_writeback_dquots()`. That timing dependency on an administrative mount-state change is beyond the attacker's control.
- PR:LPrivileges required, low
- The attacker-facing half needs no privilege at all — any local user with a file or fd on the f2fs mount can loop on `syncfs()`/`fsync()` to drive checkpoints, which is the case on every Android device where `/data` is f2fs with the `quota_ino` feature enabled by default. No capability, and no user namespace, is required on the triggering path.
- UI:NUser interaction, none
- The attacker issues the triggering syscall themselves and nothing must be opened, mounted or clicked on their behalf. The concurrent administrative remount is a timing precondition already accounted for in Attack Complexity, not victim participation in the attack.
- S:UScope, unchanged
- The damage is confined to kernel memory and kernel-managed quota/filesystem state within the same security authority. No hypervisor, IOMMU or sandbox boundary is crossed.
- C:HConfidentiality impact, high
- Running `dquot_writeback_dquots()`/`f2fs_quota_sync_file()` without `s_umount` removes exactly the protection that keeps quota state alive — `dqopt->files[type]->i_mapping` is dereferenced after only a lockless `sb_has_quota_active()` check, and `dqopt->info[cnt].dqi_dirty_list` is walked while `invalidate_dquots()` frees its entries. A use-after-free read of `struct inode`/`struct dquot` in a general-purpose slab is leverageable for disclosure of adjacent kernel objects.
- I:HIntegrity impact, high
- The same unsynchronized window lets `filemap_fdatawrite()` and `dquot_write_dquot()` write through a quota inode that `vfs_cleanup_quota_inode()` has already `iput()`ed and NULLed, giving a write into freed slab memory alongside corruption of on-disk quota accounting (f2fs flags `SBI_QUOTA_NEED_REPAIR`, requiring fsck). A use-after-free write is a classic route to control-flow hijack.
- A:HAvailability impact, high
- The immediate, reported effect is a `WARNING` splat that taints the kernel and is an outright panic on the many hardened Android, cloud and embedded builds that set `panic_on_warn=1`. Beyond that, the lost lock readily oopses the kernel via NULL dereference of a cleared `dqopt->files[type]` or a use-after-free on the quota inode.