Look up another CVE · open CVE-2026-89841 in the interactive tracker
CVE-2026-89841
f2fs: only redirty pinned folios in redirty_blocks
Published 2026-09-16 (33 days ago) by the Linux kernel CNA. Subsystem fs/f2fs. Debian urgency: unimportant.
What to do, per Debian release
Debian's own status for CVE-2026-89841 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 | not affected | 6.1.190-1 | Nothing to do. bookworm never shipped the vulnerable code. |
| Debian 13trixie | not affected | 6.12.113-1 | Nothing to do. trixie never shipped the vulnerable code. |
| Debian 14forky | fixed | 7.2.6-1 | Update the kernel and reboot. Fixed in 7.2.6-1. A running kernel keeps the old code until the machine restarts. |
| Debian unstablesid | fixed | 7.2.6-1 | Update the kernel and reboot. Fixed in 7.2.6-1. A running kernel keeps the old code until the machine restarts. |
The vulnerability
What the bug is
redirty_blocks() pins folios with read_cache_folio() and then walks the same range again with filemap_lock_folio() to redirty them and drop the references it took. Commit 5951fee46bef ("f2fs: Use a folio in redirty_blocks()") changed the second pass to a do/while loop. If read_cache_folio() fails before anything is pinned, page_idx does not advance but the cleanup loop still runs once. If readahead has already populated the failed folio in page cache, that extra iteration finds it and folio_put_refs(folio, 2) drops one reference too many. Later drop_caches or reclaim can then report "BUG: Bad page state". Only redirty the range that was pinned successfully.
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/file.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
- 2026-09-16 (33 days ago)source
- CVSS
- 7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:Hsource recompute it - Attack vector
- local (AV:L)source
- EPSS
- 0.17%, higher than 6.3% of all CVEssource
- CISA KEV
- not listedthe KEV catalogue
- Debian urgency
- unimportantsource
- 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 |
|---|---|---|
| 6.16 | 6.18.51 | 445e4a1e6025 |
| 6.16 | 7.2.5 | 89c65ec3c189 |
| 6.16 | 7.3 | 85171332742e |
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
- redirty_blocks() is reached only via local F2FS_IOC_COMPRESS_FILE/F2FS_IOC_DECOMPRESS_FILE ioctls (f2fs_ioctl → f2fs_ioc_{compress,decompress}_file) on a mounted f2fs file; these are not network, Bluetooth, or USB protocol handlers.
- AC:LAttack complexity, low
- The attacker drives the ioctl and can force the first read_cache_folio() to fail (memcg/ENOMEM, or a fatal signal during the killable wait after readahead inserted the folio), so the do/while cleanup always runs once; no victim-timed race or layout outside their control is required.
- PR:LPrivileges required, low
- Neither ioctl checks capable()/CAP_SYS_ADMIN; they need only a writable fd (FMODE_WRITE) of a compression-enabled file, and owners can set FS_COMPR_FL via FS_IOC_SETFLAGS/chattr +c on Android/embedded f2fs userdata with compress_mode=user.
- UI:NUser interaction, none
- On typical f2fs deployments (Android userdata already mounted with compression/compress_mode=user) the attacker creates or opens their own file and issues the ioctl with no victim mount, open, or other action.
- S:UScope, unchanged
- Page-cache refcount underflow and the resulting kernel oops stay inside the host kernel's security authority; this is not a VM guest-to-host escape, IOMMU bypass, or sandbox breakout.
- C:HConfidentiality impact, high
- The extra folio_put_refs(folio, 2) drops the page-cache reference and can free a folio still indexed in mapping->i_pages; that use-after-free of page-cache memory is a read primitive for arbitrary kernel/user data.
- I:HIntegrity impact, high
- The same underflow lets the freed folio be reused while still in the mapping (the stray pass also dirties and unlocks it), yielding a write primitive usable for control-flow hijack.
- A:HAvailability impact, high
- If the folio is absent, filemap_lock_folio() returns ERR_PTR(-ENOENT) and production f2fs_bug_on() WARNs then dereferences it (oops); the extra-put path reports BUG: Bad page state on reclaim/drop_caches and can panic.