Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2026-99739

published

mm/shmem: fix truncate hang in large swap entry

Published
20 Nov 2026, 05:51:11 UTC
Updated
20 Nov 2026, 05:51:11 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Linux — Linuxa99f9a4669a04662c8f9efe0e62cafc598153139 to < 9fbca74e8efbb8fed180639af349449f04a2a3c3 · b23bee8cdb7aabce5701a7f57414db5a354ae8ed to < 577374a2171cdb68e492725feb564364f93161b6 · 8a1968bd997f45a9b11aefeabdd1232e1b6c7184 to < ef6daf302dc569a67fe50968f9b6085f111b8560 · 8a1968bd997f45a9b11aefeabdd1232e1b6c7184 to < fa213b08f37f9dff78ce240a87579dc264fc7a5d · 6.12.69 to < 6.12.118 · 6.18.9 to < 6.18.64 · Other versions: unaffected Affected Not stated Linux
Linux — Linux6.19 (affected) · 0 to < 6.19 (unaffected · semver) · 6.12.118 through 6.12.* (unaffected · semver) · 6.18.64 through 6.18.* (unaffected · semver) · 7.3.5 through 7.3.* (unaffected · semver) · 7.4-rc2 and later (unaffected · original_commit_for_fix) · Other versions: affected Version-specific Not stated Linux
Amazon Linux AL2 Release evaluation Not Affected Not required Amazon Linux assessment
Amazon Linux AL2023 Release evaluation Not Affected; Pending Fix Not stated Amazon Linux assessment
Debian trixie linux Advisory build 6.12.118-1 DSA-6652-1

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.

en · Linux · cna

Vendor advisories explicitly linked to this CVE.

1

Assessment

CVSS risk assessment and additional context for this vulnerability.

No normalized assessments.

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
Linux Linux a99f9a4669a04662c8f9efe0e62cafc598153139 to < 9fbca74e8efbb8fed180639af349449f04a2a3c3 (affected · git)b23bee8cdb7aabce5701a7f57414db5a354ae8ed to < 577374a2171cdb68e492725feb564364f93161b6 (affected · git)8a1968bd997f45a9b11aefeabdd1232e1b6c7184 to < ef6daf302dc569a67fe50968f9b6085f111b8560 (affected · git)8a1968bd997f45a9b11aefeabdd1232e1b6c7184 to < fa213b08f37f9dff78ce240a87579dc264fc7a5d (affected · git)6.12.69 to < 6.12.118 (affected · semver)6.18.9 to < 6.18.64 (affected · semver)Default: unaffected Linux · cna
Linux Linux 6.19 (affected)0 to < 6.19 (unaffected · semver)6.12.118 through 6.12.* (unaffected · semver)6.18.64 through 6.18.* (unaffected · semver)7.3.5 through 7.3.* (unaffected · semver)7.4-rc2 and later (unaffected · original_commit_for_fix)Default: affected Linux · cna

Weaknesses

0

No weakness assertions.

References

4

Provider assertions

1

Linux · cna

mm/shmem: fix truncate hang in large swap entry

Provenance

Schema
5.2
Searchable
yes
Content hash
c22e13406fb3986d2018993c19d7f43d15528b6c0ee6536368d625f2f7da56d1
Ingested
20 Nov 2026, 05:52:58 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected