{"id":"CVE-2026-139799","aliases":[],"cve":{"records":[{"id":"CVE-2026-139799","source":"Linux","state":"PUBLISHED","reasons":[],"replacements":[],"disputed":false,"unsupportedWhenAssigned":false,"reserved":"2026-11-30T13:22:15.953Z","published":"2026-11-30T13:38:06.394Z","modified":"2026-11-30T13:38:06.394Z"}],"publishers":[{"name":"Linux","role":"CNA","organizationId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","modified":"2026-11-30T13:38:06.394Z"}],"references":[{"url":"https://git.kernel.org/stable/c/d64fd1229fb1437d7c62c49eba82691bfd65d541","tags":[],"source":"Linux"},{"url":"https://git.kernel.org/stable/c/f53ee5a65460010cabd75895d83258d90923ca7a","tags":[],"source":"Linux"},{"url":"https://git.kernel.org/stable/c/8f59173b5ca358bf4d1017b44da3cbe6faa80daf","tags":[],"source":"Linux"}],"weaknesses":[],"applicability":[{"source":"Linux","statements":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.17","versionEndExcluding":"6.18.65"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.17","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.17","versionEndExcluding":"7.4-rc2"}]}]}]}],"prioritization":[]},"title":"mm/shmem: hold off eviction in shmem_writeout()","titleSource":"Linux","descriptionSource":"Linux","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/shmem: hold off eviction in shmem_writeout()\n\nOnce shmem_writeout() has moved the folio from the page cache to the\nswap cache, the folio lock no longer keeps the inode alive: truncation\nand eviction find a swap entry, free it and do not wait for anybody.\nThat did not matter as long as swap_writeout() was the last thing the\nfunction did.  But since it puts the folio back when swap_writeout()\nreturns AOP_WRITEPAGE_ACTIVATE, it uses the mapping and the inode\nafterwards:\n\n  reclaim                               last close of an unlinked file\n  shmem_writeout()\n    shmem_delete_from_page_cache()\n    swap_writeout()\n      zswap_store() fails               shmem_evict_inode()\n      writeback is disabled               shmem_truncate_range()\n      return AOP_WRITEPAGE_ACTIVATE         shmem_free_swap()\n                                        destroy_inode()\n                                        ... RCU grace period, freed\n    shmem_add_to_page_cache(mapping)\n      xas_lock_irq()            <- use after free\n\nswap_writeout() behaves that way if zswap is enabled, cannot take the\nfolio and the memcg or one of its ancestors has memory.zswap.writeback\nset to 0.\n\nshmem_unuse() already added infrastructure to deal with that.\nReuse info->stop_eviction to protect the inode during writeout. Increment\nit before removing the folio from the page cache, and decrement it after\nswap_writeout() and any attempted reinsertion and inode accounting.\nIn shmem_evict_inode(), wait for the counter to reach zero even if\nswapoff has already removed the inode from the swap list. Add some helpers\nto make the code easier to digest.\n\nThere is a known remaining issue with two swapoffs racing, and the empty\nlist check not being able to detect that race. That will be addressed\nseparately later.\n\nFix generated by an LLM and sent by Josef Bacik in private.\n\n[ david: code cleanups; improve description ]","score":null,"severity":"unknown","published":"2026-11-30T13:38:06.394Z","modified":"2026-11-30T13:38:06.394Z","withdrawn":false,"knownExploited":false,"affected":[],"products":[{"vendor":"Linux","name":"Linux","platforms":[],"versions":[{"version":"6344a6d9ce13ae29e3ddf280fd8a1109a77b9996","status":"affected","lessThan":"d64fd1229fb1437d7c62c49eba82691bfd65d541","versionType":"git"},{"version":"6344a6d9ce13ae29e3ddf280fd8a1109a77b9996","status":"affected","lessThan":"f53ee5a65460010cabd75895d83258d90923ca7a","versionType":"git"},{"version":"6344a6d9ce13ae29e3ddf280fd8a1109a77b9996","status":"affected","lessThan":"8f59173b5ca358bf4d1017b44da3cbe6faa80daf","versionType":"git"}],"defaultStatus":"unaffected","cpes":[],"source":"Linux","url":"https://www.cve.org/CVERecord?id=CVE-2026-139799"},{"vendor":"Linux","name":"Linux","platforms":[],"versions":[{"version":"6.17","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.17","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"defaultStatus":"affected","cpes":[],"source":"Linux","url":"https://www.cve.org/CVERecord?id=CVE-2026-139799"}],"remediation":[],"references":["https://git.kernel.org/stable/c/d64fd1229fb1437d7c62c49eba82691bfd65d541","https://git.kernel.org/stable/c/f53ee5a65460010cabd75895d83258d90923ca7a","https://git.kernel.org/stable/c/8f59173b5ca358bf4d1017b44da3cbe6faa80daf"],"sources":[{"name":"CVE","id":"CVE-2026-139799","modified":"2026-11-30T13:38:06.394Z","url":"https://www.cve.org/CVERecord?id=CVE-2026-139799"}],"assessments":[],"sourceAffected":[],"observedAt":"2026-11-30T14:29:43.599Z","kev":{"status":"not-listed","checkedAt":"2026-11-30T23:05:32.102Z"},"coverage":[{"source":"NVD","status":"available","checkedAt":"2026-11-30T14:30:33.692Z","attemptedAt":"2026-11-30T14:30:33.692Z"},{"source":"GHSA","status":"no-result","checkedAt":"2026-11-30T14:30:33.146Z","attemptedAt":"2026-11-30T14:30:33.146Z"},{"source":"EUVD","status":"no-result","checkedAt":"2026-11-30T14:30:32.716Z","attemptedAt":"2026-11-30T14:30:32.716Z"},{"source":"EPSS","status":"no-result","checkedAt":"2026-11-30T14:30:33.306Z","attemptedAt":"2026-11-30T14:30:33.306Z"}],"evidence":[{"source":"NVD","id":"CVE-2026-139799","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139799","modified":"2026-11-30T14:20:14.250","checkedAt":"2026-11-30T14:30:33.692Z"}],"aiSummary":{"text":"A vulnerability in Linux kernel versions 6.17 and earlier, and git versions before d64fd1229fb1437d7c62c49eba82691bfd65d541, allows for a use-after-free weakness. The impact is uncertain.","model":"@cf/meta/llama-3.3-70b-instruct-fp8-fast","generatedAt":"2026-11-30T16:31:23.040Z","sources":[{"name":"CVE","url":"https://www.cve.org/CVERecord?id=CVE-2026-139799"}]}}