{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2025-38085",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-04-16T04:51:23.981Z",
        "datePublished": "2025-06-28T07:44:26.178Z",
        "dateUpdated": "2026-08-05T11:59:23.457Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T11:59:23.457Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nmm/hugetlb: fix huge_pmd_unshare() vs GUP-fast race\n\nhuge_pmd_unshare() drops a reference on a page table that may have\npreviously been shared across processes, potentially turning it into a\nnormal page table used in another process in which unrelated VMAs can\nafterwards be installed.\n\nIf this happens in the middle of a concurrent gup_fast(), gup_fast() could\nend up walking the page tables of another process.  While I don't see any\nway in which that immediately leads to kernel memory corruption, it is\nreally weird and unexpected.\n\nFix it with an explicit broadcast IPI through tlb_remove_table_sync_one(),\njust like we do in khugepaged when removing page tables for a THP\ncollapse."
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                        "baseScore": 7.8,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:L - The race is driven entirely through local syscalls — a PUD-aligned MAP_SHARED hugetlbfs/MAP_HUGETLB mapping plus munmap/mremap/mprotect/fallocate to trigger huge_pmd_unshare(), raced against gup_fast() reached via O_DIRECT, io_uring registered buffers or vmsplice. There is no network-facing path into mm/hugetlb.c.\nAC:L - The attacker controls every participant: one thread issues the GUP-fast pin, a sibling thread issues the unmap that calls huge_pmd_unshare(), and a second attacker process reuses the now-exclusively-owned PMD table, and the whole sequence can be looped indefinitely. The gup_fast() IRQ-disabled window can additionally be widened by requesting a full PUD-sized pin range, since the PUD is latched once at the start of gup_fast_pud_range() while the PMD loop then walks 512 entries.\nPR:L - hugetlb_file_setup() performs no capable() check for MAP_HUGETLB anonymous mappings, and none of huge_pmd_unshare()'s callers or the GUP-fast entry points require any capability, so an ordinary local user account suffices. Only a configured hugepage pool is needed, which is standard on cloud, virtualization, DPDK and database hosts.\nUI:N - Exploitation is fully self-contained — the attacker forks its own second process to establish PMD sharing and to repurpose the unshared page table. No victim action is required at any point.\nS:U - The defect and its impact are both within the kernel's own memory-management security authority, with no VM, IOMMU or sandbox boundary crossed. This is a standard kernel memory-safety/privilege-escalation shape, so scope remains Unchanged.\nC:H - A gup_fast() walker that latched the stale PUD proceeds to walk a PMD table that now backs a different process's address space, pinning and returning struct pages that belong to that other mm. Handing those pages to O_DIRECT or vmsplice yields a direct read primitive against another process's memory, which on hosts where a hugetlbfs segment is shared across trust boundaries (QEMU/vhost-user, DPDK/SPDK, shared DB segments) discloses privileged data.\nI:H - The same stale walk with FOLL_WRITE returns writable pins on pages mapped by the foreign address space, so an O_DIRECT read or io_uring write into that buffer modifies another process's memory arbitrarily. It also leaves DMA pins and page reference/mapcount state established behind the back of the owning mm, corrupting page-table and pinning invariants the kernel relies on.\nA:H - GUP-fast traversing page tables of an unrelated address space while that process is concurrently tearing down and re-populating them is exactly the unsynchronized page-table access the kernel elsewhere prevents with tlb_remove_table_sync_one(), and it readily produces inconsistent refcount/mapcount state, VM_WARN/BUG trips, and oops in mm paths. The race can be re-armed in a loop by an unprivileged process."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "mm/hugetlb.c"
                    ],
                    "versions": [
                        {
                            "version": "39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa",
                            "lessThan": "952596b08c74e8fe9e2883d1dc8a8f54a37384ec",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa",
                            "lessThan": "a3d864c901a300c295692d129159fc3001a56185",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa",
                            "lessThan": "b7754d3aa7bf9f62218d096c0c8f6c13698fac8b",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa",
                            "lessThan": "fe684290418ef9ef76630072086ee530b92f02b8",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa",
                            "lessThan": "034a52b5ef57c9c8225d94e9067f3390bb33922f",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa",
                            "lessThan": "a6bfeb97941a9187833b526bc6cc4ff5706d0ce9",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa",
                            "lessThan": "1013af4f585fccc4d3e5c5824d174de2257f7d6d",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "mm/hugetlb.c"
                    ],
                    "versions": [
                        {
                            "version": "2.6.20",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "2.6.20",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.239",
                            "lessThanOrEqual": "5.10.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.186",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1.142",
                            "lessThanOrEqual": "6.1.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.6.95",
                            "lessThanOrEqual": "6.6.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.35",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.15.4",
                            "lessThanOrEqual": "6.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.16",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.20",
                                    "versionEndExcluding": "5.10.239"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.20",
                                    "versionEndExcluding": "5.15.186"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.20",
                                    "versionEndExcluding": "6.1.142"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.20",
                                    "versionEndExcluding": "6.6.95"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.20",
                                    "versionEndExcluding": "6.12.35"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.20",
                                    "versionEndExcluding": "6.15.4"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.20",
                                    "versionEndExcluding": "6.16"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/952596b08c74e8fe9e2883d1dc8a8f54a37384ec"
                },
                {
                    "url": "https://git.kernel.org/stable/c/a3d864c901a300c295692d129159fc3001a56185"
                },
                {
                    "url": "https://git.kernel.org/stable/c/b7754d3aa7bf9f62218d096c0c8f6c13698fac8b"
                },
                {
                    "url": "https://git.kernel.org/stable/c/fe684290418ef9ef76630072086ee530b92f02b8"
                },
                {
                    "url": "https://git.kernel.org/stable/c/034a52b5ef57c9c8225d94e9067f3390bb33922f"
                },
                {
                    "url": "https://git.kernel.org/stable/c/a6bfeb97941a9187833b526bc6cc4ff5706d0ce9"
                },
                {
                    "url": "https://git.kernel.org/stable/c/1013af4f585fccc4d3e5c5824d174de2257f7d6d"
                },
                {
                    "url": "https://project-zero.issues.chromium.org/issues/420715744"
                }
            ],
            "title": "mm/hugetlb: fix huge_pmd_unshare() vs GUP-fast race",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        },
        "adp": [
            {
                "title": "CVE Program Container",
                "references": [
                    {
                        "url": "https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html"
                    },
                    {
                        "url": "https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html"
                    }
                ],
                "providerMetadata": {
                    "orgId": "af854a3a-2127-422b-91ae-364da2661108",
                    "shortName": "CVE",
                    "dateUpdated": "2025-11-03T17:33:54.315Z"
                }
            },
            {
                "metrics": [
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "id": "CVE-2025-38085",
                                "role": "CISA Coordinator",
                                "options": [
                                    {
                                        "Exploitation": "none"
                                    },
                                    {
                                        "Automatable": "no"
                                    },
                                    {
                                        "Technical Impact": "partial"
                                    }
                                ],
                                "version": "2.0.3",
                                "timestamp": "2026-06-10T20:41:29.670838Z"
                            }
                        }
                    }
                ],
                "title": "CISA ADP Vulnrichment",
                "providerMetadata": {
                    "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
                    "shortName": "CISA-ADP",
                    "dateUpdated": "2026-06-11T18:44:12.999Z"
                }
            }
        ]
    }
}