---
id: CVE-2026-89760
title: 'mm, swap: don''t free a hibernation slot that is in the swap cache'
summary: |-
  In the Linux kernel, the following vulnerability has been resolved:

  mm, swap: don't free a hibernation slot that is in the swap cache

  A slot with a folio in the swap cache is freed when the folio leaves the
  cache, not when its count dr…
severity: high
cvss: 7.8
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'
cvssSource: cna
cwe:
  - CWE-825
vendor: Linux
product: Linux
affected:
  - >-
    Linux >= 0d6af9bcf383bcdf601e670bb605861b01e318e7 <
    a6df73156f2d85746c69adbf13d0f5ea200e0626
  - >-
    Linux >= 0d6af9bcf383bcdf601e670bb605861b01e318e7 <
    10d9012e83efedde8718ceaa5053f836e0c8596c
  - Linux 7.1
published: '2026-09-11'
updated: '2026-10-19'
sourceUpdated: '2026-10-19T08:52:13.808Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2026-89760'
references:
  - url: 'https://git.kernel.org/stable/c/a6df73156f2d85746c69adbf13d0f5ea200e0626'
  - url: 'https://git.kernel.org/stable/c/10d9012e83efedde8718ceaa5053f836e0c8596c'
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-89760.json
  - url: 'https://access.redhat.com/security/cve/CVE-2026-89760'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2532145'
  - url: 'https://www.cve.org/CVERecord?id=CVE-2026-89760'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-89760'
  - url: >-
      https://git.kernel.org/pub/scm/linux/security/vulns.git/plain/cve/published/2026/CVE-2026-89760.mbox
tags:
  - cve.org
  - csaf
  - vex
  - red-hat
epss: 0.00165
epssPercentile: 0.05677
scores:
  cna: 7.8
  vendor: 7
ingestedAt: '2026-09-14T15:23:07.472Z'
---

## Overview

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

mm, swap: don't free a hibernation slot that is in the swap cache

A slot with a folio in the swap cache is freed when the folio leaves the
cache, not when its count drops.  swap_put_entries_cluster() follows that
rule.  swap_free_hibernation_slot() does not, it calls
__swap_cluster_free_entries() whether or not a folio sits on the slot.

Cluster readahead can put one there.  It walks a raw page_cluster sized
window of offsets around the faulting entry, and a hibernation slot passes
__swap_cache_add_check() because it is not a folio and its count is not
zero.  Freeing the slot then clears the entry under that folio.

The folio is now unreachable from the swap table, and the offset goes back
to the allocator.  The folio is still on the LRU though, so reclaim can
pick it up later.  It then takes the old offset out of folio->swap and
overwrites the table entry there, which by then may belong to someone
else.

This bug can trigger silent memory corruption, process crashes, or data
instability across completely unrelated userspace applications - typically
occurring when uswsusp is preparing the hibernation image.

I found this while working on giving hibernation slots their own marker in
the swap table, which I had discussed with Kairui. 
(https://lore.kernel.org/linux-mm/abp7aDgYLrxF3Me8@KASONG-MC4/) As far as
I know there are no reports, so there is no Reported-by/Closes to add.

Check for a cached folio before freeing.  The slot is then left in the
ordinary state where only the swap cache holds it, and it is freed when
the folio leaves the cache, either through the reclaim below or through
normal reclaim later.

## Affected

- `Linux >= 0d6af9bcf383bcdf601e670bb605861b01e318e7 < a6df73156f2d85746c69adbf13d0f5ea200e0626`
- `Linux >= 0d6af9bcf383bcdf601e670bb605861b01e318e7 < 10d9012e83efedde8718ceaa5053f836e0c8596c`
- `Linux 7.1`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

## Vendor advisories

- **Red Hat VEX** · Moderate · affected: Red Hat Enterprise Linux 6 · no fix planned: Red Hat Enterprise Linux 6 · updated 2026-09-15 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-89760.json)
