5.5

CVE-2025-22127: f2fs: fix potential deadloop in prepare_compress_overwrite()

Modified
AliasesUBUNTU-CVE-2025-22127DEBIAN-CVE-2025-22127CGA-2h9m-4mmv-8x4p
Published 16-04-2025Last modified 30-10-2026

Vulnerability summary

CVE-2025-22127 is a medium (CVSS 5.5) Improper Locking vulnerability in linux. EPSS estimates a 0.19% chance of exploitation in the next 30 days, higher than 9.1% of scored vulnerabilities.

Priority
Routine

Not severe (CVSS 5.5, local access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
5.5/10
010
Medium · v3.1 (NVD)
EPSS score
0.19%
0%100%
Low · +0.05 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 15 · Related 13

Timeline

  1. 16-04-2025
    PublishedVulnerability first disclosed.
  2. 30-10-2026
    Last modifiedVulnerability information updated.

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().

CVSS metrics

3 scores · 3 sources · 1 version

EPSS trend

Probability

0.19%

Chance of exploitation in the next 30 days

Percentile

9%

Versus all other CVEs

30-day change

Increase +0.05 pp

From 0.14% on 21-10-2026

21-10-202620-11-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: local access, low-privilege account, no user interaction (CVSS vector). Other conditions: not stated in public data.

Ubuntu129 products
  • linuxAll versions (No fix recorded) | < 6.8.0-149.149
  • linux-allwinner-5.19All versions (No fix recorded)
  • linux-awsAll versions (No fix recorded) | < 6.8.0-1069.74
  • linux-aws-5.0All versions (No fix recorded)
  • linux-aws-5.11All versions (No fix recorded)
Chainguard5 products
  • linux-aws-6.12< 6.12.68-r1 | < 6.12.77-r2 | < 6.12.72-r1 | < 6.12.57-r2 | < 6.12.62-r2 | < 6.12.77-r0 | < 6.12.67-r0 | < 6.12.60-r4 | < 6.12.63-r0 | < 6.12.66-r0 | < 6.12.74-r0 | < 6.12.71-r0 | < 6.12.80-r0 | < 6.12.69-r0 | < 6.12.62-r0 | < 6.12.78-r0 | < 6.12.68-r0 | < 6.12.74-r1 | < 6.12.62-r1 | < 6.12.65-r1 | < 6.12.77-r1 | < 6.12.65-r2 | < 6.12.65-r0 | < 6.12.76-r0 | < 6.12.70-r0 | < 6.12.72-r0
  • linux-azure-6.12< 6.12.77-r2 | < 6.12.74-r1 | < 6.12.77-r1 | < 6.12.77-r0 | < 6.12.74-r0 | < 6.12.71-r0 | < 6.12.65-r1 | < 6.12.78-r0 | < 6.12.70-r0 | < 6.12.67-r0 | < 6.12.62-r2 | < 6.12.60-r3 | < 6.12.68-r0 | < 6.12.65-r3 | < 6.12.57-r2 | < 6.12.65-r2 | < 6.12.76-r0 | < 6.12.66-r0 | < 6.12.69-r0 | < 6.12.65-r4 | < 6.12.72-r0 | < 6.12.62-r1 | < 6.12.80-r0 | < 6.12.60-r4 | < 6.12.63-r0 | < 6.12.62-r0
  • linux-gcp-6.12< 6.12.60-r4 | < 6.12.76-r0 | < 6.12.67-r0 | < 6.12.62-r0 | < 6.12.65-r2 | < 6.12.68-r0 | < 6.12.74-r0 | < 6.12.74-r1 | < 6.12.77-r0 | < 6.12.60-r3 | < 6.12.66-r0 | < 6.12.72-r0 | < 6.12.77-r1 | < 6.12.62-r1 | < 6.12.69-r0 | < 6.12.63-r0 | < 6.12.71-r0 | < 6.12.65-r1 | < 6.12.70-r0 | < 6.12.68-r1 | < 6.12.77-r2 | < 6.12.57-r2 | < 6.12.65-r0 | < 6.12.80-r0 | < 6.12.62-r2 | < 6.12.78-r0
  • linux-qemu-6.12< 6.12.65-r2 | < 6.12.74-r0 | < 6.12.77-r1 | < 6.12.68-r0 | < 6.12.77-r0 | < 6.12.76-r0 | < 6.12.70-r0 | < 6.12.78-r0 | < 6.12.65-r1 | < 6.12.80-r0 | < 6.12.74-r1 | < 6.12.71-r0 | < 6.12.72-r0 | < 6.12.77-r2 | < 6.12.69-r0 | < 6.12.67-r0 | < 6.12.66-r0
  • linux-vmware-6.12< 6.12.65-r1 | < 6.12.66-r0 | < 6.12.77-r2 | < 6.12.76-r0 | < 6.12.68-r0 | < 6.12.77-r0 | < 6.12.65-r2 | < 6.12.69-r0 | < 6.12.67-r0 | < 6.12.78-r0 | < 6.12.71-r0 | < 6.12.68-r1 | < 6.12.80-r0 | < 6.12.72-r0 | < 6.12.74-r0 | < 6.12.74-r1 | < 6.12.70-r0 | < 6.12.77-r1
Debian2 products
  • linuxAll versions (No fix recorded) | < 6.1.192-1 | < 6.12.111-1 | < 6.16.3-1
  • linux-6.12< 6.12.111-1~deb12u1
Linux2 products
  • linux≥ 4c8ff7095bef64fc47e996a938f7d57f9e077da3, < 353b262268c1646a0e7c96d4ed14c5d72a30ccb4 | ≥ 4c8ff7095bef64fc47e996a938f7d57f9e077da3, < 4513843d58d8fa1daebd3817205a15309b146342 | ≥ 4c8ff7095bef64fc47e996a938f7d57f9e077da3, < 7cd460bd9e7c6e6c30a33982603f65fb5deab1e4 | ≥ 4c8ff7095bef64fc47e996a938f7d57f9e077da3, < 7215cf8ef54bdc9082dffac4662416d54961e258 | ≥ 4c8ff7095bef64fc47e996a938f7d57f9e077da3, < 3147ee567dd9004a49826ddeaf0a4b12865d4409 | 5.6
  • linux_kernel≥ 5.6, < 6.14.2

4 vendors · 138 products

References

21 links
Show all 21 references