Skip to content
Medium 4.7

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

CVE-2026-99738 First seen on SecPulse

Affected packages

PackageAffected → Fixed
LinuxLinux —
LinuxKernel
≥ 6.17.0, < 6.18.65→ 6.18.65
≥ 6.19.0, < 7.3.5→ 7.3.5

Fix status by distribution

Records published by each distribution for this CVE. Fixed versions differ by release; check each link.

Original description The description as published by the source.

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.

Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details