{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "6cec2b95dadf77cdc1256fae1c5dfd4a2b467e61"
            },
            {
              "fixed": "d4bc03eaeef281c460370dfd57e1a671b787edd4"
            },
            {
              "fixed": "66ce68a249f4ac56cd6968aa6d8ded20fb4b7d09"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "5.19.0"
            },
            {
              "fixed": "7.3.5"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99736.json"
  },
  "details": "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-\u003e swapped = 0\n\t-\u003e freed =  1 - 0 - 0 = 1\n\t-\u003e alloced -= freed\n\t-\u003e alloced=0, swapped=0, block charge released",
  "id": "CVE-2026-99736",
  "modified": "2026-11-20T06:45:39.211426733Z",
  "published": "2026-11-20T05:51:09.778Z",
  "references": [
    {
      "type": "PACKAGE",
      "url": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/66ce68a249f4ac56cd6968aa6d8ded20fb4b7d09"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/d4bc03eaeef281c460370dfd57e1a671b787edd4"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/99xxx/CVE-2026-99736.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-99736"
    }
  ],
  "schema_version": "1.9.2",
  "summary": "mm/shmem: fix accounting of swapin-error markers"
}