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

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2025-22090— x86/mm/pat: Fix VM_PAT handling when fork() fails in copy_page_range()

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存在安全漏洞,该漏洞源于copy_page_range中fork失败时VM_PAT处理不当,可能导致资源泄漏。

CVSS 7.3 · High EPSS 0.21% · P11

Possible ATT&CK Techniques 1 AI

T1059 · Command and Scripting Interpreter

Affected Version Matrix 14

VendorProduct Version RangeStatus
Linux Linux 2ab640379a0ab4cef746ced1d7e04a0941774bcb< a6623712ba8449876f0b3de9462831523fb851e4 affected
2ab640379a0ab4cef746ced1d7e04a0941774bcb< b07398e8a5da517083f5c3f2daa8f6681b48ab28 affected
2ab640379a0ab4cef746ced1d7e04a0941774bcb< 8d6373f83f367dbed316ddeb178130a3a64b5b67 affected
2ab640379a0ab4cef746ced1d7e04a0941774bcb< da381c33f3aa6406406c9fdf07b8b0b63e0ce722 affected
2ab640379a0ab4cef746ced1d7e04a0941774bcb< de6185b8892d88142ef69768fe4077cbf40109c0 affected
2ab640379a0ab4cef746ced1d7e04a0941774bcb< dc84bc2aba85a1508f04a936f9f9a15f64ebfb31 affected
2.6.29 affected
< 2.6.29 unaffected
… +6 more rows
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2025-22090

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
x86/mm/pat: Fix VM_PAT handling when fork() fails in copy_page_range()
Source: CVE Program / CVE List V5
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: x86/mm/pat: Fix VM_PAT handling when fork() fails in copy_page_range() If track_pfn_copy() fails, we already added the dst VMA to the maple tree. As fork() fails, we'll cleanup the maple tree, and stumble over the dst VMA for which we neither performed any reservation nor copied any page tables. Consequently untrack_pfn() will see VM_PAT and try obtaining the PAT information from the page table -- which fails because the page table was not copied. The easiest fix would be to simply clear the VM_PAT flag of the dst VMA if track_pfn_copy() fails. However, the whole thing is about "simply" clearing the VM_PAT flag is shaky as well: if we passed track_pfn_copy() and performed a reservation, but copying the page tables fails, we'll simply clear the VM_PAT flag, not properly undoing the reservation ... which is also wrong. So let's fix it properly: set the VM_PAT flag only if the reservation succeeded (leaving it clear initially), and undo the reservation if anything goes wrong while copying the page tables: clearing the VM_PAT flag after undoing the reservation. Note that any copied page table entries will get zapped when the VMA will get removed later, after copy_page_range() succeeded; as VM_PAT is not set then, we won't try cleaning VM_PAT up once more and untrack_pfn() will be happy. Note that leaving these page tables in place without a reservation is not a problem, as we are aborting fork(); this process will never run. A reproducer can trigger this usually at the first try: https://gitlab.com/davidhildenbrand/scratchspace/-/raw/main/reproducers/pat_fork.c WARNING: CPU: 26 PID: 11650 at arch/x86/mm/pat/memtype.c:983 get_pat_info+0xf6/0x110 Modules linked in: ... CPU: 26 UID: 0 PID: 11650 Comm: repro3 Not tainted 6.12.0-rc5+ #92 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-2.fc40 04/01/2014 RIP: 0010:get_pat_info+0xf6/0x110 ... Call Trace: <TASK> ... untrack_pfn+0x52/0x110 unmap_single_vma+0xa6/0xe0 unmap_vmas+0x105/0x1f0 exit_mmap+0xf6/0x460 __mmput+0x4b/0x120 copy_process+0x1bf6/0x2aa0 kernel_clone+0xab/0x440 __do_sys_clone+0x66/0x90 do_syscall_64+0x95/0x180 Likely this case was missed in: d155df53f310 ("x86/mm/pat: clear VM_PAT if copy_p4d_range failed") ... and instead of undoing the reservation we simply cleared the VM_PAT flag. Keep the documentation of these functions in include/linux/pgtable.h, one place is more than sufficient -- we should clean that up for the other functions like track_pfn_remap/untrack_pfn separately.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:H
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存在安全漏洞,该漏洞源于copy_page_range中fork失败时VM_PAT处理不当,可能导致资源泄漏。
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 2ab640379a0ab4cef746ced1d7e04a0941774bcb ~ a6623712ba8449876f0b3de9462831523fb851e4 -
Linux Linux 2.6.29 -

II. Public POCs for CVE-2025-22090

# 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-22090

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

Other References for CVE-2025-22090 (5)

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-22088 9.8 CRITICAL RDMA/erdma: Prevent use-after-free in erdma_accept_newconn()
CVE-2025-22110 9.8 CRITICAL netfilter: nfnetlink_queue: Initialize ctx to avoid memory allocation error
CVE-2025-22077 9.8 CRITICAL Revert "smb: client: fix TCP timers deadlock after rmmod"
CVE-2025-22086 8.8 HIGH RDMA/mlx5: Fix mlx5_poll_one() cur_qp update flow
CVE-2025-22039 8.8 HIGH ksmbd: fix overflow in dacloffset bounds check
CVE-2025-23133 8.8 HIGH wifi: ath11k: update channel list in reg notifier instead reg worker
CVE-2025-22074 8.8 HIGH ksmbd: fix r_count dec/increment mismatch
CVE-2025-22118 8.8 HIGH ice: validate queue quanta parameters to prevent OOB access
CVE-2025-22040 8.8 HIGH ksmbd: fix session use-after-free in multichannel connection
CVE-2025-22041 8.8 HIGH ksmbd: fix use-after-free in ksmbd_sessions_deregister()
CVE-2024-58096 8.8 HIGH wifi: ath11k: add srng->lock for ath11k_hal_srng_* in monitor mode
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-22043 8.1 HIGH ksmbd: add bounds check for durable handle context
CVE-2025-22042 8.1 HIGH ksmbd: add bounds check for create lease context
CVE-2025-22049 7.8 HIGH LoongArch: Increase ARCH_DMA_MINALIGN up to 16

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

IV. Related Vulnerabilities

V. Comments for CVE-2025-22090

No comments yet


Leave a comment