CVE-2026-99739Linux vulnerability
CVSS score
n/a
Exploit probability (EPSS)
0.18%
0.18% chance of exploitation in the next 30 days, higher than 7.20% of all CVEs.
CISA KEV
Not in KEV
No confirmed exploitation reported by CISA so far.
Official 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.
Source: NVD · CNA: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
How to fix it, step by step
Check whether you're affected
Find every system running Linux and compare its version with the affected versions.
Update to a fixed version
- Update Linux to 6.12.118, 6.18.64 or later, on the branch you run.
Confirm the fix
Check that every affected system now reports a fixed version, and recheck the vendor's advisory: fixes are sometimes revised.
Was this useful?
Affected products
| Affected products | Versions |
|---|---|
| Linux Linux | ≥ a99f9a4669a04662c8f9efe0e62cafc598153139, < 9fbca74e8efbb8fed180639af349449f04a2a3c3 · ≥ b23bee8cdb7aabce5701a7f57414db5a354ae8ed, < 577374a2171cdb68e492725feb564364f93161b6 · ≥ 8a1968bd997f45a9b11aefeabdd1232e1b6c7184, < ef6daf302dc569a67fe50968f9b6085f111b8560 · ≥ 8a1968bd997f45a9b11aefeabdd1232e1b6c7184, < fa213b08f37f9dff78ce240a87579dc264fc7a5d · ≥ 6.12.69, < 6.12.118 · ≥ 6.18.9, < 6.18.64 |
Timeline
- Published:
- Last modified:
Frequently asked questions
Is CVE-2026-99739 being exploited?
There is no confirmed exploitation in CISA's KEV catalog so far. Its EPSS score estimates a 0.2% probability of exploitation in the next 30 days.
What is the CVSS score of CVE-2026-99739?
CVE-2026-99739 has not been scored yet.
Which versions are affected?
Linux Linux (≥ a99f9a4669a04662c8f9efe0e62cafc598153139, < 9fbca74e8efbb8fed180639af349449f04a2a3c3; ≥ b23bee8cdb7aabce5701a7f57414db5a354ae8ed, < 577374a2171cdb68e492725feb564364f93161b6; ≥ 8a1968bd997f45a9b11aefeabdd1232e1b6c7184, < ef6daf302dc569a67fe50968f9b6085f111b8560; ≥ 8a1968bd997f45a9b11aefeabdd1232e1b6c7184, < fa213b08f37f9dff78ce240a87579dc264fc7a5d; ≥ 6.12.69, < 6.12.118; ≥ 6.18.9, < 6.18.64)
Is there a patch for CVE-2026-99739?
The official record links to vendor advisories or patches; see “What to do” above.
References
Data: NVD, CVE.org (cvelistV5), CISA KEV and FIRST EPSS. Summary written by RedCVE with AI assistance from the official data.