{"id":"AZL-114917","summary":"CVE-2026-99461 affecting package kernel 6.6.161.1-1","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm: khugepaged: fix swap entry value to folio_pfn()\n\nPatch series \"mm: khugepaged: fix tracepoint UAF\", v5.\n\nThe khugepaged tracepoints take a folio pointer and call folio_pfn(), but\nby then the folio may no longer be valid: freed after folio_put(),\nfolio_unlock() or pte_unmap_unlock(), or not a folio at all but an\nxarray-encoded swap entry.  On classic SPARSEMEM, dereferencing it oopses\nkhugepaged as soon as the trace event is enabled; on other memory models\nit merely prints a bogus pfn.\n\nPass the pfn to the tracepoints directly, captured while the folio is\nstill pinned, closing the use-after-free windows in\nmm_khugepaged_scan_file(), mm_khugepaged_scan_pmd() and\nmm_khugepaged_collapse_file().\n\n\nThis patch (of 3):\n\nWhen the swap entries found exceed max_ptes_swap, the loop is left via\nbreak with folio still holding the xarray value that encodes the swap\nentry, not valid folio pointer.\n\nThat value is passed to trace_mm_khugepaged_scan_file(), which feeds it to\nfolio_pfn().  On FLATMEM and SPARSEMEM_VMEMMAP, the page_to_pfn() is plain\npointer arithmetic, so the trace event merely prints bogus scan_pfn.  On\nclassic SPARSEMEM, the page_to_pfn() reads page-\u003eflags, dereferencing the\ntiny encoded integer and oopsing khugepaged whenever the trace event is\nenabled.\n\nSo when folio is the swap entry value, simply set pfn to -1, just like\nexhausted scan naturally.\n\nAnd the folio_put() has maybe dropped the last reference of folio.  The\ntrace_mm_khugepaged_scan_file() is left with a dangling folio pointer.  so\nusing the folio_pfn() before dropping the reference, closing\nuse-after-free window.","modified":"2026-11-20T14:17:30.795758699Z","published":"2026-11-19T15:18:00Z","upstream":["CVE-2026-99461"],"references":[{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99461"}],"affected":[{"package":{"name":"kernel","ecosystem":"Azure Linux:3","purl":"pkg:rpm/azure-linux/kernel"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"6.6.161.1-1"}]}],"database_specific":{"source":"https://github.com/microsoft/AzureLinuxVulnerabilityData/blob/main/osv/AZL-114917.json"}}],"schema_version":"1.9.2"}