CVE-2025-22127f2fs: fix potential deadloop in prepare_compress_overwrite()
- 5.5MediumCVSS base score
- 0.19%Exploitation in 30 daysEPSS · top 91% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
Description
In the Linux kernel, the following vulnerability has been resolved: f2fs: fix potential deadloop in prepare_compress_overwrite() Jan Prusakowski reported a kernel hang issue as below: When running xfstests on linux-next kernel (6.14.0-rc3, 6.12) I encountered a problem in generic/475 test where fsstress process gets blocked in __f2fs_write_data_pages() and the test hangs. The options I used are: MKFS_OPTIONS -- -O compression -O extra_attr -O project_quota -O quota /dev/vdc MOUNT_OPTIONS -- -o acl,user_xattr -o discard,compress_extension=* /dev/vdc /vdc INFO: task kworker/u8:0:11 blocked for more than 122 seconds. Not tainted 6.14.0-rc3-xfstests-lockdep #1 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:kworker/u8:0 state:D stack:0 pid:11 tgid:11 ppid:2 task_flags:0x4208160 flags:0x00004000 Workqueue: writeback wb_workfn (flush-253:0) Call Trace: <TASK> __schedule+0x309/0x8e0 schedule+0x3a/0x100 schedule_preempt_disabled+0x15/0x30 __mutex_lock+0x59a/0xdb0 __f2fs_write_data_pages+0x3ac/0x400 do_writepages+0xe8/0x290 __writeback_single_inode+0x5c/0x360 writeback_sb_inodes+0x22f/0x570 wb_writeback+0xb0/0x410 wb_do_writeback+0x47/0x2f0 wb_workfn+0x5a/0x1c0 process_one_work+0x223/0x5b0 worker_thread+0x1d5/0x3c0 kthread+0xfd/0x230 ret_from_fork+0x31/0x50 ret_from_fork_asm+0x1a/0x30 </TASK> The root cause is: once generic/475 starts toload error table to dm device, f2fs_prepare_compress_overwrite() will loop reading compressed cluster pages due to IO error, meanwhile it has held .writepages lock, it can block all other writeback tasks. Let's fix this issue w/ below changes: - add f2fs_handle_page_eio() in prepare_compress_overwrite() to detect IO error. - detect cp_error earler in f2fs_read_multi_pages().
Timeline
ID reserved
By Linux
- 4 months later
· 4 months later
Published
- 19 months later
· 19 months later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| NVDNVD · Modified | 3.1 | Medium5.5 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
- EPSS (exploitation in 30 days)
- 0.19% · top 91% of all CVEs (17 Nov 2026)
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 5.5.
Affected products
- affected 4c8ff7095bef64fc47e996a938f7d57f9e077da3 – < 353b262268c1646a0e7c96d4ed14c5d72a30ccb4
- affected 4c8ff7095bef64fc47e996a938f7d57f9e077da3 – < 4513843d58d8fa1daebd3817205a15309b146342
- affected 4c8ff7095bef64fc47e996a938f7d57f9e077da3 – < 7cd460bd9e7c6e6c30a33982603f65fb5deab1e4
- affected 4c8ff7095bef64fc47e996a938f7d57f9e077da3 – < 7215cf8ef54bdc9082dffac4662416d54961e258
- affected 4c8ff7095bef64fc47e996a938f7d57f9e077da3 – < 3147ee567dd9004a49826ddeaf0a4b12865d4409
- affected 5.6
- unaffected < 5.6
- unaffected 6.1.191 – ≤ 6.1.*
- unaffected 6.6.160 – ≤ 6.6.*
- unaffected 6.12.109 – ≤ 6.12.*
- unaffected 6.14.2 – ≤ 6.14.*
- unaffected 6.15 – ≤ *
References
References5
- https://git.kernel.org/stable/c/353b262268c1646a0e7c96d4ed14c5d72a30ccb4 (opens in a new tab)
- https://git.kernel.org/stable/c/4513843d58d8fa1daebd3817205a15309b146342 (opens in a new tab)
- https://git.kernel.org/stable/c/7cd460bd9e7c6e6c30a33982603f65fb5deab1e4 (opens in a new tab)
- https://git.kernel.org/stable/c/7215cf8ef54bdc9082dffac4662416d54961e258 (opens in a new tab)
- https://git.kernel.org/stable/c/3147ee567dd9004a49826ddeaf0a4b12865d4409 (opens in a new tab)
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2025-11167 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisories (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2025-22127)Record last updated .