{
  "id": "CVE-2026-45942",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-45942",
  "published_at": "2026-05-27T12:17:57.95Z",
  "title": "ext4: fix e4b bitmap inconsistency reports",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 7.8,
    "source": "cna",
    "vector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "In the Linux kernel, the following vulnerability has been resolved:\n\next4: fix e4b bitmap inconsistency reports\n\nA bitmap inconsistency issue was observed during stress tests under\nmixed huge-page workloads. Ext4 reported multiple e4b bitmap check\nfailures like:\n\next4_mb_complex_scan_group:2508: group 350, 8179 free clusters as\nper group info. But got 8192 blocks\n\nAnalysis and experimentation confirmed that the issue is caused by a\nrace condition between page migration and bitmap modification. Although\nthis timing window is extremely narrow, it is still hit in practice:\n\nfolio_lock                        ext4_mb_load_buddy\n__migrate_folio\n  check ref count\n  folio_mc_copy                     __filemap_get_folio\n                                      folio_try_get(folio)\n                                  ......\n                                  mb_mark_used\n                                  ext4_mb_unload_buddy\n  __folio_migrate_mapping\n    folio_ref_freeze\nfolio_unlock\n\nThe root cause of this issue is that the fast path of load_buddy only\nincrements the folio's reference count, which is insufficient to prevent\nconcurrent folio migration. We observed that the folio migration process\nacquires the folio lock. Therefore, we can determine whether to take the\nfast path in load_buddy by checking the lock status. If the folio is\nlocked, we opt for the slow path (which acquires the lock) to close this\nconcurrency window.\n\nAdditionally, this change addresses the following issues:\n\nWhen the DOUBLE_CHECK macro is enabled to inspect bitmap-related\nissues, the following error may be triggered:\n\ncorruption in group 324 at byte 784(6272): f in copy != ff on\ndisk/prealloc\n\nAnalysis reveals that this is a false positive. There is a specific race\nwindow where the bitmap and the group descriptor become momentarily\ninconsistent, leading to this error report:\n\next4_mb_load_buddy                   ext4_mb_load_buddy\n  __filemap_get_folio(create|lock)\n    folio_lock\n  ext4_mb_init_cache\n    folio_mark_uptodate\n                                     __filemap_get_folio(no lock)\n                                     ......\n                                     mb_mark_used\n                                       mb_mark_used_double\n  mb_cmp_bitmaps\n                                       mb_set_bits(e4b-\u003ebd_bitmap)\n  folio_unlock\n\nThe original logic assumed that since mb_cmp_bitmaps is called when the\nbitmap is newly loaded from disk, the folio lock would be sufficient to\nprevent concurrent access. However, this overlooks a specific race\ncondition: if another process attempts to load buddy and finds the folio\nis already in an uptodate state, it will immediately begin using it without\nholding folio lock.",
  "cwe": "CWE-362",
  "cpes": [
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 7.8
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= c9de560ded61faa5b754137b7753da252391c55a, \u003c a3a7d360252c0d84ae8bda067fb296c9e82928d3",
          "\u003e= c9de560ded61faa5b754137b7753da252391c55a, \u003c 57e83bfbe1e412ac42daced2086f3c6f9a17bba0",
          "\u003e= c9de560ded61faa5b754137b7753da252391c55a, \u003c c05033cfc5c7699cd4df8d48cef94d01da755f24",
          "\u003e= c9de560ded61faa5b754137b7753da252391c55a, \u003c 29a07d691d282faf38c33d4b61839b89399110f9",
          "\u003e= c9de560ded61faa5b754137b7753da252391c55a, \u003c f29709a7a3fc38f5015d850504762cdef0e151f9",
          "\u003e= c9de560ded61faa5b754137b7753da252391c55a, \u003c bdc56a9c46b2a99c12313122b9352b619a2e719e"
        ],
        "fixed_in": [
          "a3a7d360252c0d84ae8bda067fb296c9e82928d3",
          "57e83bfbe1e412ac42daced2086f3c6f9a17bba0",
          "c05033cfc5c7699cd4df8d48cef94d01da755f24",
          "29a07d691d282faf38c33d4b61839b89399110f9",
          "f29709a7a3fc38f5015d850504762cdef0e151f9",
          "bdc56a9c46b2a99c12313122b9352b619a2e719e"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "2.6.25"
        ],
        "fixed_in": [
          "0",
          "6.1.191",
          "6.6.130",
          "6.12.75",
          "6.18.14",
          "6.19.4",
          "7.0"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to a3a7d360252c0d84ae8bda067fb296c9e82928d3 or 57e83bfbe1e412ac42daced2086f3c6f9a17bba0 or c05033cfc5c7699cd4df8d48cef94d01da755f24 or 29a07d691d282faf38c33d4b61839b89399110f9 or f29709a7a3fc38f5015d850504762cdef0e151f9 or bdc56a9c46b2a99c12313122b9352b619a2e719e or later.",
      "Upgrade Linux to 0 or 6.1.191 or 6.6.130 or 6.12.75 or 6.18.14 or 6.19.4 or 7.0 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
