Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

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

Quick assessment

Affected
Linux Linux
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于f2fs的prepare_compress_overwrite函数存在潜在死循环。

AI Predicted 5.5 Difficulty: Easy EPSS 0.15% · P4

Affected Version Matrix 10

VendorProduct Version RangeStatus
Linux Linux 4c8ff7095bef64fc47e996a938f7d57f9e077da3< 4513843d58d8fa1daebd3817205a15309b146342 affected
4c8ff7095bef64fc47e996a938f7d57f9e077da3< 7cd460bd9e7c6e6c30a33982603f65fb5deab1e4 affected
4c8ff7095bef64fc47e996a938f7d57f9e077da3< 7215cf8ef54bdc9082dffac4662416d54961e258 affected
4c8ff7095bef64fc47e996a938f7d57f9e077da3< 3147ee567dd9004a49826ddeaf0a4b12865d4409 affected
5.6 affected
< 5.6 unaffected
6.6.160≤ 6.6.* unaffected
6.12.109≤ 6.12.* unaffected
… +2 more rows
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2025-22127

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
f2fs: fix potential deadloop in prepare_compress_overwrite()
Source: CVE Program / CVE List V5
Vulnerability 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().
Source: CVE Program / CVE List V5
CVSS Information
N/A
Source: CVE Program / CVE List V5
Vulnerability Type
N/A
Source: CVE Program / CVE List V5
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于f2fs的prepare_compress_overwrite函数存在潜在死循环。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
Linux Linux 4c8ff7095bef64fc47e996a938f7d57f9e077da3 ~ 4513843d58d8fa1daebd3817205a15309b146342 -
Linux Linux 5.6 -

II. Public POCs for CVE-2025-22127

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2025-22127

请登录查看更多情报信息。

Patches & Fixes for CVE-2025-22127 (2)

Other References for CVE-2025-22127 (2)

Same Patch Batch · Linux · 2025-04-16 · 127 CVEs total

CVE-2025-22021 10.0 CRITICAL netfilter: socket: Lookup orig tuple for IPv6 SNAT
CVE-2025-22077 9.8 CRITICAL Revert "smb: client: fix TCP timers deadlock after rmmod"
CVE-2025-22110 9.8 CRITICAL netfilter: nfnetlink_queue: Initialize ctx to avoid memory allocation error
CVE-2025-22088 9.8 CRITICAL RDMA/erdma: Prevent use-after-free in erdma_accept_newconn()
CVE-2025-22040 8.8 HIGH ksmbd: fix session use-after-free in multichannel connection
CVE-2025-22074 8.8 HIGH ksmbd: fix r_count dec/increment mismatch
CVE-2025-23133 8.8 HIGH wifi: ath11k: update channel list in reg notifier instead reg worker
CVE-2025-22086 8.8 HIGH RDMA/mlx5: Fix mlx5_poll_one() cur_qp update flow
CVE-2024-58096 8.8 HIGH wifi: ath11k: add srng->lock for ath11k_hal_srng_* in monitor mode
CVE-2025-22039 8.8 HIGH ksmbd: fix overflow in dacloffset bounds check
CVE-2025-22041 8.8 HIGH ksmbd: fix use-after-free in ksmbd_sessions_deregister()
CVE-2025-22118 8.8 HIGH ice: validate queue quanta parameters to prevent OOB access
CVE-2025-22117 8.7 HIGH ice: fix using untrusted value of pkt_len in ice_vc_fdir_parse_raw()
CVE-2025-22108 8.6 HIGH bnxt_en: Mask the bd_cnt field in the TX BD properly
CVE-2025-22080 8.4 HIGH fs/ntfs3: Prevent integer overflow in hdr_first_de()
CVE-2025-22121 8.4 HIGH ext4: fix out-of-bound read in ext4_xattr_inode_dec_ref_all()
CVE-2025-22038 8.3 HIGH ksmbd: validate zero num_subauth before sub_auth is accessed
CVE-2025-22042 8.1 HIGH ksmbd: add bounds check for create lease context
CVE-2025-22043 8.1 HIGH ksmbd: add bounds check for durable handle context
CVE-2025-22047 7.8 HIGH x86/microcode/AMD: Fix __apply_microcode_amd()'s return value

Showing top 20 of 127 CVEs. View all on vendor page &rarr; →

IV. Related Vulnerabilities

V. Comments for CVE-2025-22127

No comments yet


Leave a comment