{"api_version":"1","generated_at":"2026-11-20T07:30:01+00:00","cve":"CVE-2026-99736","urls":{"html":"https://cve.report/CVE-2026-99736","api":"https://cve.report/api/cve/CVE-2026-99736.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-99736","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-99736"},"summary":{"title":"mm/shmem: fix accounting of swapin-error markers","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/shmem: fix accounting of swapin-error markers\n\nA failed swap read replaces the swap entry with a swapin-error marker in\nthe page-cache and subtracts its pages from \"alloced\" and \"swapped\";\nhowever, it leaves their block charge in place.\n\nRemoving the marker during truncate then subtracts from \"swapped\" again.\nThis can underflow the counters or make swapped reach zero while other\npages remain swapped out, causing swapoff to loop without finding them.\n\nWhen installing the marker, subtract only from \"swapped\" and let\nshmem_recalc_inode() reduce \"alloced\" and release the block charge.\n\nMake shmem_free_swap() report successful removal separately from the\nnumber of swap pages freed, so removing a swapin-error marker does not\nsubtract from \"swapped\" again.\n\nIt's a bit confusing, but replacing a swapped out page by a swapin-error\nmarker in shmem_set_folio_swapin_error() behaves as follows:\n\nInitially:\n\talloced=1, swapped=1, nrpages=0\nCalling shmem_recalc_inode(inode, 0, -1)\n\t-> swapped = 0\n\t-> freed =  1 - 0 - 0 = 1\n\t-> alloced -= freed\n\t-> alloced=0, swapped=0, block charge released","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-20 06:18:11","updated_at":"2026-11-20 06:18:11"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/66ce68a249f4ac56cd6968aa6d8ded20fb4b7d09","name":"https://git.kernel.org/stable/c/66ce68a249f4ac56cd6968aa6d8ded20fb4b7d09","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/d4bc03eaeef281c460370dfd57e1a671b787edd4","name":"https://git.kernel.org/stable/c/d4bc03eaeef281c460370dfd57e1a671b787edd4","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-99736","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-99736","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6cec2b95dadf77cdc1256fae1c5dfd4a2b467e61 d4bc03eaeef281c460370dfd57e1a671b787edd4 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6cec2b95dadf77cdc1256fae1c5dfd4a2b467e61 66ce68a249f4ac56cd6968aa6d8ded20fb4b7d09 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5.19","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.19 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.5 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc2 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["mm/shmem.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"d4bc03eaeef281c460370dfd57e1a671b787edd4","status":"affected","version":"6cec2b95dadf77cdc1256fae1c5dfd4a2b467e61","versionType":"git"},{"lessThan":"66ce68a249f4ac56cd6968aa6d8ded20fb4b7d09","status":"affected","version":"6cec2b95dadf77cdc1256fae1c5dfd4a2b467e61","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["mm/shmem.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"5.19"},{"lessThan":"5.19","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.5","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc2","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.5","versionStartIncluding":"5.19","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc2","versionStartIncluding":"5.19","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/shmem: fix accounting of swapin-error markers\n\nA failed swap read replaces the swap entry with a swapin-error marker in\nthe page-cache and subtracts its pages from \"alloced\" and \"swapped\";\nhowever, it leaves their block charge in place.\n\nRemoving the marker during truncate then subtracts from \"swapped\" again.\nThis can underflow the counters or make swapped reach zero while other\npages remain swapped out, causing swapoff to loop without finding them.\n\nWhen installing the marker, subtract only from \"swapped\" and let\nshmem_recalc_inode() reduce \"alloced\" and release the block charge.\n\nMake shmem_free_swap() report successful removal separately from the\nnumber of swap pages freed, so removing a swapin-error marker does not\nsubtract from \"swapped\" again.\n\nIt's a bit confusing, but replacing a swapped out page by a swapin-error\nmarker in shmem_set_folio_swapin_error() behaves as follows:\n\nInitially:\n\talloced=1, swapped=1, nrpages=0\nCalling shmem_recalc_inode(inode, 0, -1)\n\t-> swapped = 0\n\t-> freed =  1 - 0 - 0 = 1\n\t-> alloced -= freed\n\t-> alloced=0, swapped=0, block charge released"}],"providerMetadata":{"dateUpdated":"2026-11-20T05:51:09.778Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/d4bc03eaeef281c460370dfd57e1a671b787edd4"},{"url":"https://git.kernel.org/stable/c/66ce68a249f4ac56cd6968aa6d8ded20fb4b7d09"}],"title":"mm/shmem: fix accounting of swapin-error markers","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-99736","datePublished":"2026-11-20T05:51:09.778Z","dateReserved":"2026-09-25T10:25:14.431Z","dateUpdated":"2026-11-20T05:51:09.778Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-20 06:18:11","lastModifiedDate":"2026-11-20 06:18:11","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"99736","Ordinal":"1","Title":"mm/shmem: fix accounting of swapin-error markers","CVE":"CVE-2026-99736","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"99736","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/shmem: fix accounting of swapin-error markers\n\nA failed swap read replaces the swap entry with a swapin-error marker in\nthe page-cache and subtracts its pages from \"alloced\" and \"swapped\";\nhowever, it leaves their block charge in place.\n\nRemoving the marker during truncate then subtracts from \"swapped\" again.\nThis can underflow the counters or make swapped reach zero while other\npages remain swapped out, causing swapoff to loop without finding them.\n\nWhen installing the marker, subtract only from \"swapped\" and let\nshmem_recalc_inode() reduce \"alloced\" and release the block charge.\n\nMake shmem_free_swap() report successful removal separately from the\nnumber of swap pages freed, so removing a swapin-error marker does not\nsubtract from \"swapped\" again.\n\nIt's a bit confusing, but replacing a swapped out page by a swapin-error\nmarker in shmem_set_folio_swapin_error() behaves as follows:\n\nInitially:\n\talloced=1, swapped=1, nrpages=0\nCalling shmem_recalc_inode(inode, 0, -1)\n\t-> swapped = 0\n\t-> freed =  1 - 0 - 0 = 1\n\t-> alloced -= freed\n\t-> alloced=0, swapped=0, block charge released","Type":"Description","Title":"mm/shmem: fix accounting of swapin-error markers"}]}}}