{"id":"CVE-2026-99738","aliases":["CVE-2026-99738"],"related":[],"kind":"vulnerability","state":"published","title":"mm/shmem: preserve allocation errors when swapping in large entries","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/shmem: preserve allocation errors when swapping in large entries\n\nshmem_swapin_folio() adjusts swap to the requested slot within a large\nswap entry before allocating a folio. If allocation or charging fails,\nthe error path compares this adjusted value with the original entry\nstill stored in the XArray in shmem_confirm_swap().\n\nUnless the index is at the start of the entry, this turns -ENOMEM into\n-EEXIST even though nothing changed.\n\nThe caller retries -EEXIST, so persistent allocation failures can leave\nthe task spinning instead of returning the error.\n\nRestore swap to index_entry on allocation failure so the existing error\npath checks the original entry. This preserves the allocation error if\nthe entry is unchanged and still retries if it changed concurrently.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/shmem: preserve allocation errors when swapping in large entries\n\nshmem_swapin_folio() adjusts swap to the requested slot within a large\nswap entry before allocating a folio. If allocation or charging fails,\nthe error path compares this adjusted value with the original entry\nstill stored in the XArray in shmem_confirm_swap().\n\nUnless the index is at the start of the entry, this turns -ENOMEM into\n-EEXIST even though nothing changed.\n\nThe caller retries -EEXIST, so persistent allocation failures can leave\nthe task spinning instead of returning the error.\n\nRestore swap to index_entry on allocation failure so the existing error\npath checks the original entry. This preserves the allocation error if\nthe entry is unchanged and still retries if it changed concurrently.","source":"cvelist"}],"published":"2026-11-20T05:51:11.250Z","modified":"2026-11-23T08:18:14.143Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"91ab656ece137c368a3189dfd42f8c9203a6285c","fixed":"265dfa2525817d3be437576505186beb623384bf","status":"affected"},{"type":"git","introduced":"91ab656ece137c368a3189dfd42f8c9203a6285c","fixed":"680afc486db200e7b08307cb28be4f90766afcff","status":"affected"},{"type":"git","introduced":"91ab656ece137c368a3189dfd42f8c9203a6285c","fixed":"f4ce23b1feef16d435aa1188b6c2a637a5373ed5","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.17","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.17","status":"unaffected"},{"type":"semver","introduced":"6.18.65","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.3.5","lastAffected":"7.3.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.4-rc2","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/265dfa2525817d3be437576505186beb623384bf","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/680afc486db200e7b08307cb28be4f90766afcff","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f4ce23b1feef16d435aa1188b6c2a637a5373ed5","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-99738","url":"https://www.cve.org/CVERecord?id=CVE-2026-99738","licence":"CVE Terms of Use","modified":"2026-11-23T08:06:45.949Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-99738","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99738","licence":"Public domain","modified":"2026-11-23T08:18:14.143Z"}],"updatedAt":"2026-11-25T22:59:52.326Z","epss":{"score":0.00166,"percentile":0.06192,"date":"2026-12-01T12:00:22.000Z"}}