{
    "document": {
        "category": "csaf_base",
        "csaf_version": "2.0",
        "distribution": {
            "tlp": {
                "label": "WHITE"
            }
        },
        "lang": "en",
        "notes": [
            {
                "category": "legal_disclaimer",
                "text": "The Netherlands Cyber Security Center (henceforth: NCSC-NL) maintains this portal to enhance access to its information and vulnerabilities. The use of this information is subject to the following terms and conditions:\n\nThe vulnerabilities disclosed in this portal are gathered by NCSC-NL from a variety of open sources, which the user can retrieve from other platforms. NCSC-NL makes every reasonable effort to ensure that the content of this portal is kept up to date, and that it is accurate and complete. Nevertheless, NCSC-NL cannot entirely rule out the possibility of errors, and therefore cannot give any warranty in respect of its completeness, accuracy or real-time keeping up-to-date. NCSC-NL does not control nor guarantee the accuracy, relevance, timeliness or completeness of information obtained from these external sources. The vulnerabilities disclosed in this portal are intended solely for the convenience of professional parties to take appropriate measures to manage the risks posed to the cybersecurity. No rights can be derived from the information provided therein.\n\nNCSC-NL and the Kingdom of the Netherlands assume no legal liability or responsibility for any damage resulting from either the use or inability of use of the vulnerabilities disclosed in this portal. This includes damage resulting from the inaccuracy of incompleteness of the information contained in it.\nThe information on this page is subject to Dutch law. All disputes related to or arising from the use of this portal regarding the disclosure of vulnerabilities will be submitted to the competent court in The Hague. This choice of means also applies to the court in summary proceedings."
            }
        ],
        "publisher": {
            "category": "coordinator",
            "contact_details": "cert@ncsc.nl",
            "name": "National Cyber Security Centre",
            "namespace": "https://www.ncsc.nl/"
        },
        "title": "CVE-2026-31397",
        "tracking": {
            "current_release_date": "2026-04-03T16:54:33.849350Z",
            "generator": {
                "date": "2026-02-17T15:00:00Z",
                "engine": {
                    "name": "V.E.L.M.A",
                    "version": "1.7"
                }
            },
            "id": "CVE-2026-31397",
            "initial_release_date": "2026-04-03T15:39:46.190486Z",
            "revision_history": [
                {
                    "date": "2026-04-03T15:39:46.190486Z",
                    "number": "1",
                    "summary": "CVE created.| Source created.| CVE status created. (valid)| Description created for source.| Products created (3).| Products connected (5).| References created (3)."
                },
                {
                    "date": "2026-04-03T15:39:48.636485Z",
                    "number": "2",
                    "summary": "NCSC Score created."
                },
                {
                    "date": "2026-04-03T16:50:24.827680Z",
                    "number": "3",
                    "summary": "Source created.| CVE status created. (valid)| Description created for source.| References created (3)."
                }
            ],
            "status": "interim",
            "version": "3"
        }
    },
    "product_tree": {
        "branches": [
            {
                "branches": [
                    {
                        "branches": [
                            {
                                "category": "product_version_range",
                                "name": "vers:git/e3981db444a0a18d350d9f92e3f2e8d489b54211|<e3133d0986dc5a231d5419167dbac65312b28b41",
                                "product": {
                                    "name": "vers:git/e3981db444a0a18d350d9f92e3f2e8d489b54211|<e3133d0986dc5a231d5419167dbac65312b28b41",
                                    "product_id": "CSAFPID-5992276"
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:git/e3981db444a0a18d350d9f92e3f2e8d489b54211|<f3caaee0f9e489fd2282d4ce45791dc8aed2da62",
                                "product": {
                                    "name": "vers:git/e3981db444a0a18d350d9f92e3f2e8d489b54211|<f3caaee0f9e489fd2282d4ce45791dc8aed2da62",
                                    "product_id": "CSAFPID-5992275"
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:git/e3981db444a0a18d350d9f92e3f2e8d489b54211|<fae654083bfa409bb2244f390232e2be47f05bfc",
                                "product": {
                                    "name": "vers:git/e3981db444a0a18d350d9f92e3f2e8d489b54211|<fae654083bfa409bb2244f390232e2be47f05bfc",
                                    "product_id": "CSAFPID-5992277"
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:semver/6.18.20|<=6.18.*",
                                "product": {
                                    "name": "vers:semver/6.18.20|<=6.18.*",
                                    "product_id": "CSAFPID-5905005"
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:semver/6.19.10|<=6.19.*",
                                "product": {
                                    "name": "vers:semver/6.19.10|<=6.19.*",
                                    "product_id": "CSAFPID-5905006"
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:semver/<6.16",
                                "product": {
                                    "name": "vers:semver/<6.16",
                                    "product_id": "CSAFPID-3063687"
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/6.16",
                                "product": {
                                    "name": "vers:unknown/6.16",
                                    "product_id": "CSAFPID-3063686"
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/7.0-rc5|<=*",
                                "product": {
                                    "name": "vers:unknown/7.0-rc5|<=*",
                                    "product_id": "CSAFPID-5905027"
                                }
                            }
                        ],
                        "category": "product_name",
                        "name": "Linux"
                    }
                ],
                "category": "vendor",
                "name": "Linux"
            }
        ]
    },
    "vulnerabilities": [
        {
            "cve": "CVE-2026-31397",
            "notes": [
                {
                    "category": "description",
                    "text": "In the Linux kernel, the following vulnerability has been resolved:\n\nmm/huge_memory: fix use of NULL folio in move_pages_huge_pmd()\n\nmove_pages_huge_pmd() handles UFFDIO_MOVE for both normal THPs and huge\nzero pages.  For the huge zero page path, src_folio is explicitly set to\nNULL, and is used as a sentinel to skip folio operations like lock and\nrmap.\n\nIn the huge zero page branch, src_folio is NULL, so folio_mk_pmd(NULL,\npgprot) passes NULL through folio_pfn() and page_to_pfn().  With\nSPARSEMEM_VMEMMAP this silently produces a bogus PFN, installing a PMD\npointing to non-existent physical memory.  On other memory models it is a\nNULL dereference.\n\nUse page_folio(src_page) to obtain the valid huge zero folio from the\npage, which was obtained from pmd_page() and remains valid throughout.\n\nAfter commit d82d09e48219 (\"mm/huge_memory: mark PMD mappings of the huge\nzero folio special\"), moved huge zero PMDs must remain special so\nvm_normal_page_pmd() continues to treat them as special mappings.\n\nmove_pages_huge_pmd() currently reconstructs the destination PMD in the\nhuge zero page branch, which drops PMD state such as pmd_special() on\narchitectures with CONFIG_ARCH_HAS_PTE_SPECIAL.  As a result,\nvm_normal_page_pmd() can treat the moved huge zero PMD as a normal page\nand corrupt its refcount.\n\nInstead of reconstructing the PMD from the folio, derive the destination\nentry from src_pmdval after pmdp_huge_clear_flush(), then handle the PMD\nmetadata the same way move_huge_pmd() does for moved entries by marking it\nsoft-dirty and clearing uffd-wp.",
                    "title": "cveprojectv5 - https://raw.githubusercontent.com/CVEProject/cvelistV5/main/cves/2026/31xxx/CVE-2026-31397.json"
                },
                {
                    "category": "description",
                    "text": "In the Linux kernel, the following vulnerability has been resolved:\n\nmm/huge_memory: fix use of NULL folio in move_pages_huge_pmd()\n\nmove_pages_huge_pmd() handles UFFDIO_MOVE for both normal THPs and huge\nzero pages.  For the huge zero page path, src_folio is explicitly set to\nNULL, and is used as a sentinel to skip folio operations like lock and\nrmap.\n\nIn the huge zero page branch, src_folio is NULL, so folio_mk_pmd(NULL,\npgprot) passes NULL through folio_pfn() and page_to_pfn().  With\nSPARSEMEM_VMEMMAP this silently produces a bogus PFN, installing a PMD\npointing to non-existent physical memory.  On other memory models it is a\nNULL dereference.\n\nUse page_folio(src_page) to obtain the valid huge zero folio from the\npage, which was obtained from pmd_page() and remains valid throughout.\n\nAfter commit d82d09e48219 (\"mm/huge_memory: mark PMD mappings of the huge\nzero folio special\"), moved huge zero PMDs must remain special so\nvm_normal_page_pmd() continues to treat them as special mappings.\n\nmove_pages_huge_pmd() currently reconstructs the destination PMD in the\nhuge zero page branch, which drops PMD state such as pmd_special() on\narchitectures with CONFIG_ARCH_HAS_PTE_SPECIAL.  As a result,\nvm_normal_page_pmd() can treat the moved huge zero PMD as a normal page\nand corrupt its refcount.\n\nInstead of reconstructing the PMD from the folio, derive the destination\nentry from src_pmdval after pmdp_huge_clear_flush(), then handle the PMD\nmetadata the same way move_huge_pmd() does for moved entries by marking it\nsoft-dirty and clearing uffd-wp.",
                    "title": "nvd - https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2026-31397"
                },
                {
                    "category": "other",
                    "text": "4.1",
                    "title": "NCSC Score"
                },
                {
                    "category": "other",
                    "text": "The value of the most recent CVSS (V3) score, Is related to a product by vendor Linux",
                    "title": "NCSC Score top decreasing factors"
                }
            ],
            "product_status": {
                "known_affected": [
                    "CSAFPID-3063686",
                    "CSAFPID-5992275",
                    "CSAFPID-5992276",
                    "CSAFPID-5992277"
                ],
                "known_not_affected": [
                    "CSAFPID-3063687",
                    "CSAFPID-5905005",
                    "CSAFPID-5905006",
                    "CSAFPID-5905027"
                ]
            },
            "references": [
                {
                    "category": "external",
                    "summary": "Source - cveprojectv5",
                    "url": "https://raw.githubusercontent.com/CVEProject/cvelistV5/main/cves/2026/31xxx/CVE-2026-31397.json"
                },
                {
                    "category": "external",
                    "summary": "Source - nvd",
                    "url": "https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2026-31397"
                },
                {
                    "category": "external",
                    "summary": "Reference - cveprojectv5; nvd",
                    "url": "https://git.kernel.org/stable/c/f3caaee0f9e489fd2282d4ce45791dc8aed2da62"
                },
                {
                    "category": "external",
                    "summary": "Reference - cveprojectv5; nvd",
                    "url": "https://git.kernel.org/stable/c/e3133d0986dc5a231d5419167dbac65312b28b41"
                },
                {
                    "category": "external",
                    "summary": "Reference - cveprojectv5; nvd",
                    "url": "https://git.kernel.org/stable/c/fae654083bfa409bb2244f390232e2be47f05bfc"
                }
            ],
            "title": "CVE-2026-31397"
        }
    ]
}