# CVE-2026-89757: mm/mglru: fix and remove redundant unevictable folio handling

> A bug in Linux kernel memory management causes incorrect folio handling, potentially leading to memory corruption, inflated accounting, and denial of service.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Not stated
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 11 Sep 2026
- **Updated:** 21 Oct 2026
- **Also known as:** AZL-100605, BELL-CVE-2026-89757, DEBIAN-CVE-2026-89757, GHSA-rf75-rpf7-p84g, UBUNTU-CVE-2026-89757

## What is CVE-2026-89757?

CVE-2026-89757 is a memory corruption vulnerability in Linux, published on 11 Sep 2026. 

### Official description

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

mm/mglru: fix and remove redundant unevictable folio handling

sort_folio() has a shortcut for moving folios that are no longer evictable
but are still sitting on a generation list.  However, this shortcut is
buggy.  It does not follow the PG_lru usage convention, and it has a more
serious issue.

Unevictable folios are not threaded on lists[LRU_UNEVICTABLE], so that
folio->lru can be reused to hold folio->mlock_count (see the comment in
lruvec_init()).  Hence lruvec_add_folio() skips the list_add() for them,
and every other place that turns a folio unevictable initialises
mlock_count explicitly: lru_add() sets it to 0, __mlock_folio() and
__mlock_new_folio() set it to !!folio_test_mlocked(folio).  sort_folio()
sets nothing, and the lru_gen_del_folio() right above it may have already
poisoned folio->lru via list_del(), so mlock_count ends up aliasing
LIST_POISON2, which reads as 0x122, i.e.  290.  The result is user
visible.  On munlock, __munlock_folio() decrements that bogus count, finds
it still non-zero and bails out before clearing PG_mlocked, so the folio
remains unevictable and the Mlocked accounting stays inflated until the
folio is freed.

The shortcut also touches the LRU flags in the wrong order.  It calls
lru_gen_del_folio() while PG_lru is still set, so a concurrent
folio_test_clear_lru() (e.g.  compaction, folio_isolate_lru()) can succeed
on a folio that has already been taken off the generation list, which may
lead to unexpected behavior.

So fix it by isolating them as common folios and letting the generic
shrink path cull them.  This matches the classical LRU behavior, and there
should be no visible effect on the generic eviction or isolation behavior.

There is no performance concern either, such a folio goes through this
once, and then it is off the generation lists for good.

## Which versions are affected by CVE-2026-89757?


## How do I fix CVE-2026-89757?

Apply the vendor's patch.

## Is CVE-2026-89757 being exploited?

There is no known exploitation of CVE-2026-89757 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-89757 and fix it if it is affected.

What it is: CVE-2026-89757 is a memory corruption vulnerability in Linux, published on 11 Sep 2026. 
Exploitation: There is no known exploitation of CVE-2026-89757 in the wild and no public exploit code.

Affected product: Linux. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-89757/ (Markdown: https://insights.sbomify.com/CVE-2026-89757/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-89757
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-89757
- OSV: https://osv.dev/vulnerability/CVE-2026-89757

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-89757/
Summaries are generated and may contain mistakes; the official description above is the record.
