{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "7361d1e3763baaf7b9349c576137851458ad38d1"
            },
            {
              "fixed": "425d32d6288d7d845e486af9419bbedccd8c9103"
            },
            {
              "fixed": "038166f873c4caf6e85cfd4ea0c5a5ba297b4e8b"
            },
            {
              "fixed": "649932fc3815eda2f24eb4de4b3a5e94886ee0b9"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "6.15.0"
            },
            {
              "fixed": "6.18.34"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.19.0"
            },
            {
              "fixed": "7.0.11"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/64xxx/CVE-2026-64031.json"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nerofs: fix managed cache race for unaligned extents\n\nAfter unaligned compressed extents were introduced, the following race\ncould occur:\n\n[Thread 1]                                   [Thread 2]\n(z_erofs_fill_bio_vec)\n\u003chandle a Z_EROFS_PREALLOCATED_FOLIO folio\u003e\n...\nfilemap_add_folio (1)\n                                             (z_erofs_bind_cache)\n                                             \u003cthe same folio is found..\u003e\n                                             ..\n                                             ..\nfolio_attach_private (2)\n                                             filemap_add_folio (3) again\n\nSince (1) is executed but (2) hasn't been executed yet, it's possible\nthat another thread finds the same managed folio in z_erofs_bind_cache()\nfor a different pcluster and calls filemap_add_folio() again since\nfolio-\u003eprivate is still Z_EROFS_PREALLOCATED_FOLIO.\n\nFix this by explicitly clearing folio-\u003eprivate before making the folio\nvisible in the managed cache so that another pcluster can simply wait\non the locked managed folio as what we did for other shared cases [1].\n\nThis only impacts unaligned data compression (`-E48bit` with zstd,\nfor example).\n\n[1] Commit 9e2f9d34dd12 (\"erofs: handle overlapped pclusters out of\n crafted images properly\") was originally introduced to handle crafted\n overlapped extents, but it addresses unaligned extents as well.",
  "id": "CVE-2026-64031",
  "modified": "2026-07-22T05:29:40.488098355Z",
  "published": "2026-07-19T15:39:21.609Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/038166f873c4caf6e85cfd4ea0c5a5ba297b4e8b"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/425d32d6288d7d845e486af9419bbedccd8c9103"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/649932fc3815eda2f24eb4de4b3a5e94886ee0b9"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/64xxx/CVE-2026-64031.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-64031"
    },
    {
      "type": "PACKAGE",
      "url": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
    }
  ],
  "schema_version": "1.8.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "erofs: fix managed cache race for unaligned extents"
}