cvelo
P4 · InfoEPSS 0.2%

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

  • CVE-2026-99738
  • GHSA-p2c5-p9qm-m686
  • EUVD-2026-130854

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.

Text from the CVE.org record.

Recommendation

No source states a fixed version. Check the vendor advisory.

Affected

  • Linux

    Affected versionsFixed in
    6.17none stated
    before 6.17: not affectednone stated
    from 6.18.65 up to 6.18.*: not affectednone stated
    from 7.3.5 up to 7.3.*: not affectednone stated
    from 7.4-rc2 onwards: not affectednone stated

Product versions from the CVE.org record.

Timeline

  1. Published

Related news

No article from the followed outlets names this vulnerability.