CVE-2026-46280: lib: test_hmm: evict device pages on file close to avoid use-after-free
In the Linux kernel, the following vulnerability has been resolved:
lib: testhmm: evict device pages on file close to avoid use-after-free
Patch series "Minor hmmtest fixes and cleanups".
Two bugfixes a cleanup for the HMM kernel selftests. These were mostly reported by Zenghui Yu with special thanks to Lorenzo for analysing and pointing out the problems.
This patch (of 3):
When dmirrorfopsrelease() is called it frees the dmirror struct but doesn't migrate device private pages back to system memory first. This leaves those pages with a dangling zonedevicedata pointer to the freed dmirror.
If a subsequent fault occurs on those pages (eg. during coredump) the dmirrordevmemfault() callback dereferences the stale pointer causing a kernel panic. This was reported [1] when running mm/ksfthmm.sh on arm64, where a test failure triggered SIGABRT and the resulting coredump walked the VMAs faulting in the stale device private pages.
Fix this by calling dmirrordeviceevictchunk() for each devmem chunk in dmirrorfopsrelease() to migrate all device private pages back to system memory before freeing the dmirror struct. The function is moved earlier in the file to avoid a forward declaration.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 6.6.141.1-1 - Configuration
Modify dmirror_fops_release() so that it migrates device private pages back to system memory first. Specifically, call dmirror_device_evict_chunk() for each devmem chunk to avoid leaving dangling zone_device_data pointers in pages whose fault path (dmirror_devmem_fault) would otherwise dereference a stale pointer and panic.
Linux kernel (HMM test / dmirror) dmirror_fops_release() behavior = Evict device private pages back to system memory before freeing the dmirror struct; call dmirror_device_evict_chunk() for each devmem chunk.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-46280?
CVE-2026-46280 has a risk level of 46.
What type of vulnerability is CVE-2026-46280?
CVE-2026-46280 is categorized as a Use After Free vulnerability in the Linux kernel.
How does CVE-2026-46280 affect the Linux kernel?
CVE-2026-46280 can lead to potential exploitation during the file close process, causing unintended behavior.
How do I fix CVE-2026-46280?
To address CVE-2026-46280, ensure that your Linux kernel is updated to the patched version released after June 8, 2026.
Who reported the issues related to CVE-2026-46280?
The issues related to CVE-2026-46280 were primarily reported by Zenghui Yu.