CVE-2026-138830: mm/shmem: don't release a swapin-error marker as a swap entry
In the Linux kernel, the following vulnerability has been resolved:
mm/shmem: don't release a swapin-error marker as a swap entry
A failed shmem swapin (eg, EIO) frees the swap slot and leaves a PTEMARKERPOISONED entry in the page cache. On truncate or eviction shmemfreeswap() passes that marker to swapputentriesdirect(), which warns because it is not a swap entry. There is nothing left to release either way.
Skip the release for non-swap entries, as every other caller already does.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.64 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.4 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.4-1
Event History
Frequently Asked Questions
Under what conditions can this occur?
It requires a shmem swap-in failure, such as an EIO error. The failed swap-in must leave a PTE_MARKER_POISONED entry in the page cache, followed by truncation or eviction of that shmem data.
What is the practical impact of reaching the affected path?
The swap slot has already been freed after the failed swap-in, so there is no remaining swap entry to release. The affected cleanup path passes the non-swap marker to swap_put_entries_direct(), causing a warning.
Is there a workaround if the fix cannot be applied immediately?
The provided information does not identify a configuration workaround. Reducing or resolving the underlying shmem swap-in I/O failures may prevent the triggering condition, but the supplied data does not specify an operational mitigation.