{"id":"CVE-2026-99738","aliases":[],"title":"mm/shmem: preserve allocation errors when swapping in large entries","originalDescription":"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.","severity":{"cvss":null,"vector":null,"label":null},"exploitation":{"kev":null,"epss":{"score":0.00166,"percentile":0.06179},"exploitDb":null},"affected":[{"ecosystem":"Linux","name":"Kernel","range":">=6.17.0, <6.18.65","fixed":"6.18.65"},{"ecosystem":"Linux","name":"Kernel","range":">=6.17.0, <7.3.5","fixed":"7.3.5"},{"ecosystem":"Linux","name":"Kernel","range":">=6.19.0, <7.3.5","fixed":"7.3.5"},{"ecosystem":"vendor","name":"Linux","range":">=91ab656ece137c368a3189dfd42f8c9203a6285c, <265dfa2525817d3be437576505186beb623384bf","fixed":"265dfa2525817d3be437576505186beb623384bf"},{"ecosystem":"vendor","name":"Linux","range":">=91ab656ece137c368a3189dfd42f8c9203a6285c, <680afc486db200e7b08307cb28be4f90766afcff","fixed":"680afc486db200e7b08307cb28be4f90766afcff"},{"ecosystem":"vendor","name":"Linux","range":">=91ab656ece137c368a3189dfd42f8c9203a6285c, <f4ce23b1feef16d435aa1188b6c2a637a5373ed5","fixed":"f4ce23b1feef16d435aa1188b6c2a637a5373ed5"}],"references":[{"url":"https://git.kernel.org/stable/c/680afc486db200e7b08307cb28be4f90766afcff","type":"other"},{"url":"https://git.kernel.org/stable/c/f4ce23b1feef16d435aa1188b6c2a637a5373ed5","type":"other"},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","type":"package"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99738.json","type":"advisory"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99738","type":"advisory"},{"url":"https://git.kernel.org/stable/c/265dfa2525817d3be437576505186beb623384bf","type":"other"}],"sources":[{"name":"nvd","at":"2026-11-23T08:46:27.601Z","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99738","license":"NVD terms of use","firstSeenAt":"2026-11-20T06:30:46.305Z"},{"name":"osv","at":"2026-11-23T10:59:13.294Z","url":"https://osv.dev/vulnerability/CVE-2026-99738","license":"CC-BY 4.0","firstSeenAt":"2026-11-20T07:04:04.445Z"},{"name":"cvelistV5","at":"2026-11-23T21:30:59.294Z","url":"https://www.cve.org/CVERecord?id=CVE-2026-99738","license":"CVE Terms of Use","firstSeenAt":"2026-11-20T06:28:16.289Z"}],"firstSeenAt":"2026-11-20T06:28:16.289Z","publishedAt":"2026-11-20T05:51:11.250Z","modifiedAt":"2026-11-23T10:02:13.535Z"}