# CVE-2026-138832: mm/madvise: reclaim isolated folios if PTE restart fails

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.18%, higher than 8% of CVEs (2026-12-01)
- Published: 2026-11-30T13:25:24.002Z
- Modified: 2026-11-30T14:17:37.613Z
- Assigned by: Linux

## Description

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

mm/madvise: reclaim isolated folios if PTE restart fails

MADV_PAGEOUT collects isolated folios on a local list before reclaiming
them after the PTE walk.  The reschedule path drops the PTE lock and then
restarts the mapping with pte_offset_map_lock().

A concurrent operation can remove or replace the PTE table while the lock
is dropped, causing pte_offset_map_lock() to return NULL.  Returning
directly in that case bypasses reclaim_pages(), leaving the collected
folios off the LRU with elevated references.

This results in a permanent memory leak.  nr_isolated_anon increases
reliably and does not decrease when the process dies.

Route the failure through the existing cleanup path so any isolated folios
are reclaimed or put back.

Simplest userland pseudo-code reproducer:

p = mmap(PMD_SIZE, ANONYMOUS);
touch_every_page(p, PMD_SIZE);
parallel {
   while (1) madvise(p, PMD_SIZE, MADV_PAGEOUT);
   while (1) {
       madvise(p, PMD_SIZE, MADV_DONTNEED);
       touch_every_page(p, PMD_SIZE);
   }
}

Reproduced in qemu trivially with some explicit widening of the race window.

(As written by CVE List.)

## Affected

- Linux Linux: from b2f557a21bc8fffdcd65794eda8a854e024999f3 before 52202745c8b3835119f4f6d00060df416e49b329; from b2f557a21bc8fffdcd65794eda8a854e024999f3 before 06eebc180008290a042403e66fff2e80542c99a0; from b2f557a21bc8fffdcd65794eda8a854e024999f3 before 380fbb3a43228a3f439d64549a9d854a23d336b8; from b2f557a21bc8fffdcd65794eda8a854e024999f3 before 5445a6359d717354dd76d509b8e693f13403ec61; 6.7 (not affected: before 6.7; from 6.12.117 up to 6.12.*; from 6.18.63 up to 6.18.*; from 7.3.4 up to 7.3.*; from 7.4-rc1 up to *)

## References

- <https://git.kernel.org/stable/c/52202745c8b3835119f4f6d00060df416e49b329>
- <https://git.kernel.org/stable/c/06eebc180008290a042403e66fff2e80542c99a0>
- <https://git.kernel.org/stable/c/380fbb3a43228a3f439d64549a9d854a23d336b8>
- <https://git.kernel.org/stable/c/5445a6359d717354dd76d509b8e693f13403ec61>

## Sources

- CVE List: [CVE-2026-138832](https://www.cve.org/CVERecord?id=CVE-2026-138832), CVE Terms of Use, modified 2026-11-30
- NVD: [CVE-2026-138832](https://nvd.nist.gov/vuln/detail/CVE-2026-138832), Public domain, modified 2026-11-30

---

Page: https://cve.day/CVE-2026-138832 · Whole record: https://cve.day/CVE-2026-138832.json · Rebuilt by cve.day 2026-11-30T14:32:34.812Z
