Skip to main content
VulnerabilityPublished

CVE-2026-99739: Linux kernel · mm/shmem: fix truncate hang in large swap entry

Source GCVE Database

0
Compare
Authoritative record:CVE-2026-99739· High

Not known to be exploited · fixed in fa213b08f37f9dff78ce240a87579dc264fc7a5d : patch Linux kernel soon.

Data as of 20 Nov 2026, 07:34 UTC

Severity
High

Rated by Threat Radar · CVSS not yet scored by NVD

Thin evidence

One scorer or none
Patch
Available – fixed in fa213b08f37f9dff78ce240a87579dc264fc7a5d, ef6daf302dc569a67fe50968f9b6085f111b8560, 577374a2171cdb68e492725feb564364f93161b6 +3

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 20 Nov 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 19 Nov 2026.

What to do

Upgrade to a fixed release listed under Affected software.

Affected software

ProductAffectedFixed in
LinuxLinuxAffected
  • >=6.12.69 <6.12.118
  • >=6.18.9 <6.18.64
Fixed in
  • fa213b08f37f9dff78ce240a87579dc264fc7a5d
  • ef6daf302dc569a67fe50968f9b6085f111b8560
  • 577374a2171cdb68e492725feb564364f93161b6
  • 9fbca74e8efbb8fed180639af349449f04a2a3c3
  • 6.18.64
  • 6.12.118
LinuxLinuxAffected
  • =6.19
Fixed in–

Description

In the Linux kernel, the following vulnerability has been resolved: mm/shmem: fix truncate hang in large swap entry Truncating a tmpfs file or memfd to a page-aligned size inside a large swap entry can loop indefinitely in shmem_undo_range(). The task holds the inode lock and cannot be killed. A large swap entry represents a whole swapped-out folio. For example, truncate a file whose pages 0-7 share one swap entry to four pages: [ 0 1 2 3 | 4 5 6 7 ] keep | discard ^ new EOF, start = 4 i_size has already been updated when boundary handling asks shmem_get_partial_folio() for page 4. Since it is swapped out, the helper calls shmem_get_folio() with SGP_READ. That rejects page 4 with -EINVAL because its starting offset equals i_size. Nothing is read back. The final scan cannot free the entry without losing pages 0-3. It skips it, restarts from start = 4, and finds it again indefinitely. An unaligned truncate avoids this particular failure because the requested page starts below i_size. Folios already in the page-cache cannot trigger it as the direct lookup will return them beyond EOF. Fix it by letting shmem_get_partial_folio() call shmem_swapin_folio() directly for swap entries. This bypasses the read path's i_size check, allowing the existing boundary handling to zero and split the folio. If swap-in returns a smaller folio, it also splits the swap entry so the final scan can free the entries beyond EOF. Retry the lookup if the entry changes during swap-in. Handling swap-in allocation failures remains broken and is unchanged by this commit. Even when shmem_swapin_folio() correctly returns -ENOMEM instead of -EEXIST, shmem_get_partial_folio() returns NULL and shmem_undo_range() skips boundary handling. If the large swap entry remains intact, truncation can still loop in the final scan, while hole punching can return without zeroing the boundary. This may read an entire large folio back from swap while holding i_rwsem, only to discard part of it. Avoiding that I/O would require splitting both the swap entry and any large folio still in the swap cache. That, however, is much bigger work.

References

Community reviews

Loading reviews…