← VULNERABILITIES

CVE-2026-99738

mm/shmem: preserve allocation errors when swapping in large entries

UnscoredFix available
CVSS
—
EPSS
0.17% (p6)
Published
2026-11-20
Age
14d old
Modified
2026-11-23
Product
Linux Linux

Description

In the Linux kernel, the following vulnerability has been resolved: mm/shmem: preserve allocation errors when swapping in large entries shmem_swapin_folio() adjusts swap to the requested slot within a large swap entry before allocating a folio. If allocation or charging fails, the error path compares this adjusted value with the original entry still stored in the XArray in shmem_confirm_swap(). Unless the index is at the start of the entry, this turns -ENOMEM into -EEXIST even though nothing changed. The caller retries -EEXIST, so persistent allocation failures can leave the task spinning instead of returning the error. Restore swap to index_entry on allocation failure so the existing error path checks the original entry. This preserves the allocation error if the entry is unchanged and still retries if it changed concurrently.

Fixed in

265dfa2525817d3be437576505186beb623384bf · 6.18.65 · 680afc486db200e7b08307cb28be4f90766afcff · 7.3.5 · f4ce23b1feef16d435aa1188b6c2a637a5373ed5

Affected packages

EcosystemPackageRangeFixed
LinuxKernel>=6.17.0, <6.18.656.18.65
LinuxKernel>=6.17.0, <7.3.57.3.5
LinuxKernel>=6.19.0, <7.3.57.3.5
vendorLinux>=91ab656ece137c368a3189dfd42f8c9203a6285c, <265dfa2525817d3be437576505186beb623384bf265dfa2525817d3be437576505186beb623384bf
vendorLinux>=91ab656ece137c368a3189dfd42f8c9203a6285c, <680afc486db200e7b08307cb28be4f90766afcff680afc486db200e7b08307cb28be4f90766afcff
vendorLinux>=91ab656ece137c368a3189dfd42f8c9203a6285c, <f4ce23b1feef16d435aa1188b6c2a637a5373ed5f4ce23b1feef16d435aa1188b6c2a637a5373ed5

Sources

  • NVD · first seen 14d ago · NVD terms of use
  • OSV · first seen 14d ago · CC-BY 4.0
  • CVE List · first seen 14d ago · CVE Terms of Use

References

JSON