CVE-2025-22090: Vulnerability in Linux Linux
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.
AI Analysis
Technical Summary
CVE-2025-22090 is a vulnerability identified in the Linux kernel's memory management subsystem, specifically related to the handling of the Page Attribute Table (PAT) flags during the fork() system call on x86 architectures. The issue arises in the function copy_page_range(), which is responsible for duplicating the virtual memory areas (VMAs) and page tables when a process forks. When the helper function track_pfn_copy() fails during this process, the destination VMA is added to the maple tree without proper reservation or copying of page tables. Subsequently, during cleanup after the fork failure, untrack_pfn() attempts to access PAT information from page tables that were never copied, leading to a failure. The root cause is improper management of the VM_PAT flag: it is set prematurely before successful reservation and copying, and simply clearing this flag upon failure does not correctly undo reservations, potentially leaving inconsistent state. The fix involves setting the VM_PAT flag only after a successful reservation and ensuring that any partial reservations are properly undone if copying fails. This prevents untrack_pfn() from accessing invalid PAT data and avoids kernel crashes or undefined behavior. The vulnerability can be triggered reliably, as demonstrated by a provided reproducer, and manifests as kernel warnings or panics related to get_pat_info() and untrack_pfn() calls. Although this flaw does not appear to have been exploited in the wild yet, it poses a risk of local denial of service or kernel instability due to improper memory management during process creation.
Potential Impact
For European organizations relying on Linux-based systems, especially servers and infrastructure running x86 architectures, this vulnerability could lead to system instability or crashes during process creation via fork(), which is a fundamental operation for many applications and services. This can result in denial of service conditions affecting critical services, including web servers, databases, and containerized environments. Since the flaw occurs at the kernel level, it could potentially disrupt multi-tenant environments or cloud services that depend on Linux virtualization and container technologies. Although exploitation requires local code execution (e.g., ability to invoke fork() with specific memory conditions), attackers who gain limited access could leverage this bug to cause kernel panics, leading to service outages. This is particularly impactful for industries with high availability requirements such as finance, healthcare, and telecommunications. Additionally, kernel instability might open avenues for privilege escalation or further exploitation if combined with other vulnerabilities, increasing the threat surface. The absence of known exploits in the wild reduces immediate risk but does not eliminate the need for prompt remediation.
Mitigation Recommendations
European organizations should prioritize updating Linux kernels to versions where this vulnerability is patched. Since the issue is deep in the kernel memory management code, applying official Linux kernel updates from trusted distributors is the most effective mitigation. For environments where immediate patching is challenging, organizations should restrict untrusted local code execution and limit user privileges to reduce the risk of triggering the flaw. Monitoring kernel logs for warnings related to get_pat_info() or untrack_pfn() can help detect attempts to exploit or accidental triggers of the bug. In containerized or virtualized environments, isolating workloads and enforcing strict resource and process creation limits can reduce exposure. Additionally, organizations should review their incident response plans to quickly address potential denial of service incidents stemming from kernel crashes. Engaging with Linux distribution vendors for timely patches and testing updates in staging environments before production deployment is recommended to ensure stability and security.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Italy, Spain, Poland
CVE-2025-22090: Vulnerability in Linux Linux
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.
AI-Powered Analysis
Technical Analysis
CVE-2025-22090 is a vulnerability identified in the Linux kernel's memory management subsystem, specifically related to the handling of the Page Attribute Table (PAT) flags during the fork() system call on x86 architectures. The issue arises in the function copy_page_range(), which is responsible for duplicating the virtual memory areas (VMAs) and page tables when a process forks. When the helper function track_pfn_copy() fails during this process, the destination VMA is added to the maple tree without proper reservation or copying of page tables. Subsequently, during cleanup after the fork failure, untrack_pfn() attempts to access PAT information from page tables that were never copied, leading to a failure. The root cause is improper management of the VM_PAT flag: it is set prematurely before successful reservation and copying, and simply clearing this flag upon failure does not correctly undo reservations, potentially leaving inconsistent state. The fix involves setting the VM_PAT flag only after a successful reservation and ensuring that any partial reservations are properly undone if copying fails. This prevents untrack_pfn() from accessing invalid PAT data and avoids kernel crashes or undefined behavior. The vulnerability can be triggered reliably, as demonstrated by a provided reproducer, and manifests as kernel warnings or panics related to get_pat_info() and untrack_pfn() calls. Although this flaw does not appear to have been exploited in the wild yet, it poses a risk of local denial of service or kernel instability due to improper memory management during process creation.
Potential Impact
For European organizations relying on Linux-based systems, especially servers and infrastructure running x86 architectures, this vulnerability could lead to system instability or crashes during process creation via fork(), which is a fundamental operation for many applications and services. This can result in denial of service conditions affecting critical services, including web servers, databases, and containerized environments. Since the flaw occurs at the kernel level, it could potentially disrupt multi-tenant environments or cloud services that depend on Linux virtualization and container technologies. Although exploitation requires local code execution (e.g., ability to invoke fork() with specific memory conditions), attackers who gain limited access could leverage this bug to cause kernel panics, leading to service outages. This is particularly impactful for industries with high availability requirements such as finance, healthcare, and telecommunications. Additionally, kernel instability might open avenues for privilege escalation or further exploitation if combined with other vulnerabilities, increasing the threat surface. The absence of known exploits in the wild reduces immediate risk but does not eliminate the need for prompt remediation.
Mitigation Recommendations
European organizations should prioritize updating Linux kernels to versions where this vulnerability is patched. Since the issue is deep in the kernel memory management code, applying official Linux kernel updates from trusted distributors is the most effective mitigation. For environments where immediate patching is challenging, organizations should restrict untrusted local code execution and limit user privileges to reduce the risk of triggering the flaw. Monitoring kernel logs for warnings related to get_pat_info() or untrack_pfn() can help detect attempts to exploit or accidental triggers of the bug. In containerized or virtualized environments, isolating workloads and enforcing strict resource and process creation limits can reduce exposure. Additionally, organizations should review their incident response plans to quickly address potential denial of service incidents stemming from kernel crashes. Engaging with Linux distribution vendors for timely patches and testing updates in staging environments before production deployment is recommended to ensure stability and security.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2024-12-29T08:45:45.817Z
- Cisa Enriched
- false
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d9831c4522896dcbe80b0
Added to database: 5/21/2025, 9:09:05 AM
Last enriched: 7/3/2025, 9:10:39 PM
Last updated: 7/27/2025, 9:46:36 AM
Views: 11
Related Threats
CVE-2025-25229: Vulnerability in Omnissa Omnissa Workspace ONE UEM
MediumCVE-2025-25231: Vulnerability in Omnissa Omnissa Workspace ONE UEM
HighCVE-2025-53187: CWE-94 Improper Control of Generation of Code ('Code Injection') in ABB ASPECT
HighCVE-2025-54063: CWE-94: Improper Control of Generation of Code ('Code Injection') in CherryHQ cherry-studio
HighCVE-2025-1500: CWE-434 Unrestricted Upload of File with Dangerous Type in IBM Maximo Application Suite
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.