CVE-2026-99461

Not scored yetLast modified Nov 23, 2026

Description

In the Linux kernel, the following vulnerability has been resolved:

mm: khugepaged: fix swap entry value to folio_pfn()

Patch series "mm: khugepaged: fix tracepoint UAF", v5.

The khugepaged tracepoints take a folio pointer and call folio_pfn(), but by then the folio may no longer be valid: freed after folio_put(), folio_unlock() or pte_unmap_unlock(), or not a folio at all but an xarray-encoded swap entry. On classic SPARSEMEM, dereferencing it oopses khugepaged as soon as the trace event is enabled; on other memory models it merely prints a bogus pfn.

Pass the pfn to the tracepoints directly, captured while the folio is still pinned, closing the use-after-free windows in mm_khugepaged_scan_file(), mm_khugepaged_scan_pmd() and mm_khugepaged_collapse_file().

This patch (of 3):

When the swap entries found exceed max_ptes_swap, the loop is left via break with folio still holding the xarray value that encodes the swap entry, not valid folio pointer.

That value is passed to trace_mm_khugepaged_scan_file(), which feeds it to folio_pfn(). On FLATMEM and SPARSEMEM_VMEMMAP, the page_to_pfn() is plain pointer arithmetic, so the trace event merely prints bogus scan_pfn. On classic SPARSEMEM, the page_to_pfn() reads page->flags, dereferencing the tiny encoded integer and oopsing khugepaged whenever the trace event is enabled.

So when folio is the swap entry value, simply set pfn to -1, just like exhausted scan naturally.

And the folio_put() has maybe dropped the last reference of folio. The trace_mm_khugepaged_scan_file() is left with a dangling folio pointer. so using the folio_pfn() before dropping the reference, closing use-after-free window.

Metrics

No CVSS score has been published yet.

Affected software

Source: the vendor's advisory (CNA). NVD analysis pending.

No affected versions have been published.

Timeline

Published
Nov 19, 2026
Last modified
Nov 23, 2026
NVD status
Received

Related CVEs from 2026

CVE-2026-994627.8In the Linux kernel, the following vulnerability has been resolved: mm/truncate: look up the end-edge straddler by index In truncate_inodeCVE-2026-994637.8In the Linux kernel, the following vulnerability has been resolved: mm/rmap: don't discard lazyfree THPs at PMD level __discard_anon_folioCVE-2026-99464In the Linux kernel, the following vulnerability has been resolved: media: redrat3: fix UAF in probe error path leaving rc device registereCVE-2026-99465In the Linux kernel, the following vulnerability has been resolved: media: microchip-isc: take a reference on the parsed endpoints for_eacCVE-2026-99466In the Linux kernel, the following vulnerability has been resolved: media: microchip-csi2dc: fix async notifier leak on probe error path cCVE-2026-99467In the Linux kernel, the following vulnerability has been resolved: media: marvell: mcam: stop DMA and cancel s_bh_work before freeing DMA CVE-2026-994687.0In the Linux kernel, the following vulnerability has been resolved: media: imx-jpeg: cancel timeout worker when streaming stops Each per-fCVE-2026-99469In the Linux kernel, the following vulnerability has been resolved: media: gspca: use vb2_video_unregister_device() on disconnect gspca usCVE-2026-99478.8Use after free in XML in Google Chrome prior to 148.0.7778.216 allowed a remote attacker to execute arbitrary code inside a sandbox via a crCVE-2026-99470In the Linux kernel, the following vulnerability has been resolved: media: cx23885: unregister DVB bus when SP2 CI setup fails The DVBSKY CVE-2026-994717.8In the Linux kernel, the following vulnerability has been resolved: KVM: PPC: Book3S HV: Add SRCU protection for virtual-mode HPT hcalls TCVE-2026-994727.8In the Linux kernel, the following vulnerability has been resolved: KVM: pfncache: use a dedicated invalidation sequence for cache refresh
CVE-2026-99461: Unscored | Vulnix