# CVE-2026-99738: mm/shmem: preserve allocation errors when swapping in large entries

Status: published. Published: 2026-11-20. Updated: 2026-11-23.

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.

## Remediation

No remediation reported in collected sources

## Affected products and versions

- Linux / Linux: ≥ 91ab656ece137c368a3189dfd42f8c9203a6285c; < 265dfa2525817d3be437576505186beb623384bf (affected, git); ≥ 91ab656ece137c368a3189dfd42f8c9203a6285c; < 680afc486db200e7b08307cb28be4f90766afcff (affected, git); ≥ 91ab656ece137c368a3189dfd42f8c9203a6285c; < f4ce23b1feef16d435aa1188b6c2a637a5373ed5 (affected, git). Source: CNA: Linux
- Linux / Linux: 6.17 (affected); ≥ 0; < 6.17 (unaffected, semver); ≥ 6.18.65; ≤ 6.18.* (unaffected, semver); ≥ 7.3.5; ≤ 7.3.* (unaffected, semver); ≥ 7.4-rc2; ≤ * (unaffected, original_commit_for_fix). Source: CNA: Linux

## Severity and prioritization

- CISA KEV: No listing in collected sources

- EPSS: 0.16% as of 2026-11-22; percentile 4.72%

- SSVC: Not available

- Weaknesses: Not reported

## Exploit evidence

No exploit evidence in collected sources. This is not proof of no exploitation.

## References

- https://git.kernel.org/stable/c/265dfa2525817d3be437576505186beb623384bf (CNA: Linux)

- https://git.kernel.org/stable/c/680afc486db200e7b08307cb28be4f90766afcff (CNA: Linux)

- https://git.kernel.org/stable/c/f4ce23b1feef16d435aa1188b6c2a637a5373ed5 (CNA: Linux)

- https://git.kernel.org/stable/c/680afc486db200e7b08307cb28be4f90766afcff (416baaa9-dc9f-4396-8d5f-8c081fb06d67)

- https://git.kernel.org/stable/c/f4ce23b1feef16d435aa1188b6c2a637a5373ed5 (416baaa9-dc9f-4396-8d5f-8c081fb06d67)

## Provenance

- CNA: Linux: https://www.cve.org/CVERecord?id=CVE-2026-99738; retrieved 2026-11-23; source updated 2026-11-23

- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-99738; retrieved 2026-11-20; source updated 2026-11-20

- FIRST EPSS: https://api.first.org/data/v1/epss?cve=CVE-2026-99738; retrieved 2026-11-23; source updated Not reported

Revision: bb863d14af714360b16073e7354ef3473b2c031ea5c2fdd4657896b440160484

Canonical: https://y2.dev/cve/CVE-2026-99738

## Agent and API access

Public CVE pages, Markdown, and JSON are free to read without an account or API key.

- Public catalog: https://y2.dev/cve/index.json. Follow nextCursor with the same search, filters, sort, and limit (1–100). A null cursor marks the end.

- WebMCP: search_cve_disclosures, get_cve_disclosure, get_cve_page_markdown, get_y2_cve_access. Available in compatible browsers.

- Cyber API: https://api.y2.dev/api/v2/cyber/cves and https://api.y2.dev/api/v2/cyber/cves/{cveId}.

- Y2 Pro or Elite: create a workspace API key with the intel:cyber scope and send Authorization: Bearer <Y2_API_KEY>. Setup: https://y2.dev/docs/api/create-key.

- x402: Pay per request without an account or API key. Omit Authorization, read the HTTP 402 PAYMENT-REQUIRED challenge, validate its current requirements, and retry with PAYMENT-SIGNATURE through an authorized payment client. These browser tools never make payments. Guide: https://y2.dev/docs/api/x402.

- OpenAPI: https://y2.dev/api/openapi.yaml. Agent access metadata: https://y2.dev/cve/agent.json.

Collected public records only. Check source status for coverage and freshness.