In the Linux kernel, the following vulnerability has been resolved:
mm/rmap: initialize nr_pages to 1 at loop start in try_to_unmap_one
Initialize nr_pages to 1 at the start of each loop iteration, like folio_referenced_one() does.
Without this, nr_pages computed by a previous folio_unmap_pte_batch() call can be reused on a later iteration that does not run folio_unmap_pte_batch() again.
mmap a 64K large folio with MAP_ANONYMOUS | MAP_DROPPABLE, then call madvise(MADV_FREE), then make the last page device-exclusive via HMM_DMIRROR_EXCLUSIVE.
Trigger node reclaim through sysfs. Now, in try_to_unmap_one(), we will first clear the first 15 out of 16 entries mapping the lazyfree folio. This will set nr_pages to 15. In the next pvmw walk, this nr_pages gets reused on a device-exclusive pte, thus potentially corrupting folio refcount/mapcount.
At the moment, I have a userspace program which can make the kernel spit out a trace, but the blow up is in folio_referenced_one(), because there are existing bugs in the interaction between device-private and rmap (which too I am investigating). I did a one liner kernel change to avoid going into folio_referenced_one(), and the kernel blows up at folio_remove_rmap_ptes in try_to_unmap_one which is what I wanted.
Note that the bug is there not since file folio batching but lazyfree folio batching, since device-exclusive only works for anonymous folios.
Userspace visible effect is simply kernel crashing somewhere due to refcount/mapcount corruption.
CVSS Details
- CVSS 3.1 Base Score: 7.8
- CVSS 3.1 Vector: (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H)
Covered by Rapid7
| Product | Vendor Advisory | Solution File | Added | Published |
|---|---|---|---|---|
| Amazon_linux_2023 | — | Upgrade kernel6.18-modules-extra-commonUpgrade python3-perf6.18-debuginfoUpgrade bpftool6.18-debuginfoUpgrade bpftool6.18Upgrade kernel-livepatch-6.18.35-68.127Upgrade kernel6.18-debuginfo-common-aarch64Upgrade perf6.18-debuginfoUpgrade kernel6.18-debuginfoUpgrade kernel6.18-develUpgrade perf6.18Upgrade kernel6.18Upgrade kernel6.18-tools-debuginfoUpgrade kernel6.18-headersUpgrade microvm-kernel6.18Upgrade kernel6.18-toolsUpgrade python3-perf6.18Upgrade kernel6.18-debuginfo-common-x86_64Upgrade kernel6.18-tools-develUpgrade kernel6.18-modules-extra | Aug 10, 2026 | Jul 19, 2026 |
| Ubuntu | — | Upgrade linux-image-oracleUpgrade linux-image-azure-fde-7.0Upgrade linux-image-7.0.0-1015-raspi-realtimeUpgrade linux-image-7.0.0-1009-azure-fdeUpgrade linux-image-7.0.0-1009-aws-64kUpgrade linux-image-raspi-7.0Upgrade linux-image-7.0.0-1011-gcpUpgrade linux-image-gcp-7.0Upgrade linux-image-oracle-7.0Upgrade linux-image-7.0.0-1009-awsUpgrade linux-image-awsUpgrade linux-image-aws-64k-7.0Upgrade linux-image-7.0.0-1008-oracle-64kUpgrade linux-image-ibmUpgrade linux-image-raspi-realtimeUpgrade linux-image-oracle-64k-7.0Upgrade linux-image-7.0.0-1014-azureUpgrade linux-image-aws-64kUpgrade linux-image-7.0.0-1010-azureUpgrade linux-image-7.0.0-2016-nvidia-bos-64kUpgrade linux-image-aws-7.0Upgrade linux-image-gcp-64kUpgrade linux-image-gcpUpgrade linux-image-7.0.0-2016-nvidia-bosUpgrade linux-image-ibm-7.0Upgrade linux-image-7.0.0-1010-ibmUpgrade linux-image-raspi-realtime-7.0Upgrade linux-image-oracle-64kUpgrade linux-image-nvidia-bos-7.0Upgrade linux-image-nvidia-bos-64kUpgrade linux-image-nvidia-bosUpgrade linux-image-azure-7.0Upgrade linux-image-7.0.0-1008-oracleUpgrade linux-image-nvidia-64k-7.0Upgrade linux-image-nvidiaUpgrade linux-image-7.0.0-1016-nvidia-64kUpgrade linux-image-7.0.0-1011-gcp-64kUpgrade linux-image-nvidia-64kUpgrade linux-image-raspiUpgrade linux-image-nvidia-bos-64k-7.0Upgrade linux-image-azureUpgrade linux-image-nvidia-64k-hwe-26.04Upgrade linux-image-nvidia-hwe-26.04Upgrade linux-image-azure-fdeUpgrade linux-image-7.0.0-1016-nvidiaUpgrade linux-image-nvidia-7.0Upgrade linux-image-gcp-64k-7.0Upgrade linux-image-7.0.0-1015-raspi | Jul 21, 2026 | Jul 20, 2026 |
Prioritise with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub