CVE-2026-99738

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

State
Published
Severity
Not scored
Published
Nov 20, 2026
Updated
Nov 20, 2026
Reserved
Sep 25, 2026

Read the record on cve.org

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.

Scores

The record has no CVSS score.

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 91ab656ece137c368a3189dfd42f8c9203a6285c to before 680afc486db200e7b08307cb28be4f90766afcffAffected
  • 91ab656ece137c368a3189dfd42f8c9203a6285c to before f4ce23b1feef16d435aa1188b6c2a637a5373ed5Affected
LinuxLinux
  • 6.17Affected
  • before 6.17Not affected
  • 7.3.5 through 7.3.*Not affected
  • 7.4-rc2 and laterNot affected

References

Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.