cve.bz

CVE-2025-22127 linux linux kernel: Improper Locking

5.5 mediumEPSS 0.2%Fix available

Medium (5.5) in linux linux kernel. EPSS 0.2% estimated probability of exploitation activity in the next 30 days.

On this page
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().

Severity

CVSS 3.1

5.5 medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
EPSS
0.2% (unchanged from 0.2% a week ago; 0.1% 30 days ago) estimated probability of exploitation activity in the next 30 days; 9th percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CWE
CWE-667 Improper Locking
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2025-22127 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-22127?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-22127?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2025-22127 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Linux5.6 and later

Fixed in

ProductRelease lineFixed in
Linux6.16.1.191
Linux6.66.6.160
Linux6.126.12.109
Linux6.146.14.2
Linuxlater releases6.15

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12linux6.1.192-1DEBIAN-CVE-2025-22127
Debian12linux-6.126.12.111-1~deb12u1DEBIAN-CVE-2025-22127
Debian13linux6.12.111-1DEBIAN-CVE-2025-22127
Debian14linux6.16.3-1DEBIAN-CVE-2025-22127
Ubuntu16.04:LTSlinux-hwe-edgeno fix listedUBUNTU-CVE-2025-22127
Ubuntu18.04:LTSlinux-gcp, linux-hwe, linux-oem and 12 moreno fix listedUBUNTU-CVE-2025-22127
Ubuntu20.04:LTSlinux-gke, linux-gkeop, linux-riscv and 26 moreno fix listedUBUNTU-CVE-2025-22127
Ubuntu22.04:LTSlinux, linux-aws, linux-gcp and 48 moreno fix listedUBUNTU-CVE-2025-22127
Ubuntu22.04:LTSlinux-aws-6.86.8.0-1069.74~22.04.1UBUNTU-CVE-2025-22127 USN-9024-1
Ubuntu22.04:LTSlinux-azure-6.86.8.0-1073.82~22.04.1UBUNTU-CVE-2025-22127 USN-9026-1
Ubuntu22.04:LTSlinux-azure-fde-6.86.8.0-1071.78~22.04.1UBUNTU-CVE-2025-22127 USN-9026-1
Ubuntu22.04:LTSlinux-gcp-6.86.8.0-1073.81~22.04.1UBUNTU-CVE-2025-22127 USN-9024-1
Ubuntu22.04:LTSlinux-hwe-6.86.8.0-149.149~22.04.1UBUNTU-CVE-2025-22127 USN-9066-1
Ubuntu22.04:LTSlinux-ibm-6.86.8.0-1069.70~22.04.1UBUNTU-CVE-2025-22127 USN-9024-1
Ubuntu22.04:LTSlinux-lowlatency-hwe-6.86.8.0-149.149.1~22.04.1UBUNTU-CVE-2025-22127 USN-9024-1
Ubuntu22.04:LTSlinux-oracle-6.86.8.0-1067.71~22.04.1UBUNTU-CVE-2025-22127 USN-9025-1
35 more for Ubuntu in the JSON and on Ubuntu's page.
Alpaquita23linux-lts6.1.191-r0BELL-CVE-2025-22127
Alpaquita25linux-lts6.12.111-r0BELL-CVE-2025-22127
Alpaquitastreamlinux-lts6.18.35-r1BELL-CVE-2025-22127

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Alpaquita.

Red Hat

ProductPackageStateAdvisory
Red Hat Enterprise Linux 10kernelNot affected
Red Hat Enterprise Linux 6kernelNot affected
Red Hat Enterprise Linux 7kernelNot affected
Red Hat Enterprise Linux 7kernel-rtNot affected
Red Hat Enterprise Linux 8kernelNot affected
Red Hat Enterprise Linux 8kernel-rtNot affected
Red Hat Enterprise Linux 9kernelNot affected
Red Hat Enterprise Linux 9kernel-rtNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2025-22127.

Attack patterns (CAPEC)

  • CAPEC-25 Forced Deadlock Likelihood: Low · Severity: High
  • CAPEC-26 Leveraging Race Conditions Likelihood: High · Severity: High
  • CAPEC-27 Leveraging Race Conditions via Symbolic Links Likelihood: Medium · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON