{
  "cveId": "CVE-2026-31702",
  "url": "https://patchblox.com/security/cve/CVE-2026-31702",
  "summary": "CVE-2026-31702 is fixed in linux on 1 platform, first by DEBIAN-CVE-2026-31702, released May 15, 2026. It is not reported as exploited. Patch Radar priority: High.",
  "title": "f2fs: fix use-after-free of sbi in f2fs_compress_write_end_io()",
  "description": "In the Linux kernel, the following vulnerability has been resolved:  f2fs: fix use-after-free of sbi in f2fs_compress_write_end_io()  In f2fs_compress_write_end_io(), dec_page_count(sbi, type) can bring the F2FS_WB_CP_DATA counter to zero, unblocking f2fs_wait_on_all_pages() in f2fs_put_super() on a concurrent unmount CPU. The unmount path then proceeds to call f2fs_destroy_page_array_cache(sbi), which destroys sbi-\u003Epage_array_slab via kmem_cache_destroy(), and eventually kfree(sbi). Meanwhile, the bio completion callback is still executing: when it reaches page_array_free(sbi, ...), it dereferences sbi-\u003Epage_array_slab \u2014 a destroyed slab cache \u2014 to call kmem_cache_free(), causing a use-after-free.  This is the same class of bug as CVE-2026-23234 (which fixed the equivalent race in f2fs_write_end_io() in data.c), but in the compressed writeback completion path that was not covered by that fix.  Fix this by moving dec_page_count() to after page_array_free(), so that all sbi accesses complete before the counter decrement that can unblock unmount. For non-last folios (where atomic_dec_return on cic-\u003Epending_pages is nonzero), dec_page_count is called immediately before returning \u2014 page_array_free is not reached on this path, so there is no post-decrement sbi access. For the last folio, page_array_free runs while the F2FS_WB_CP_DATA counter is still nonzero (this folio has not yet decremented it), keeping sbi alive, and dec_page_count runs as the final operation.",
  "published": "2026-05-01T14:16:20Z",
  "severity": "Important",
  "cvss": 7.8,
  "cvssVector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
  "epss": 0.00119,
  "epssPercentile": 0.01791,
  "priority": "High",
  "priorityTier": 3,
  "exploited": false,
  "vendorExploited": false,
  "disclosed": false,
  "vendorAdvisory": "https://msrc.microsoft.com/update-guide/vulnerability/CVE-2026-31702",
  "fixes": [
    {
      "platform": "linux",
      "product": "linux",
      "release": "Debian 12.15 (bookworm)",
      "fixedVersion": "6.1.176-1",
      "fix": "DEBIAN-CVE-2026-31702",
      "url": "https://patchblox.com/security/fix/linux/debian-cve-2026-31702",
      "released": "2026-05-15T16:01:09Z"
    },
    {
      "platform": "linux",
      "product": "linux",
      "release": "Debian 13.5 (trixie)",
      "fixedVersion": "6.12.85-1",
      "fix": "DEBIAN-CVE-2026-31702",
      "url": "https://patchblox.com/security/fix/linux/debian-cve-2026-31702",
      "released": "2026-05-15T16:01:09Z"
    },
    {
      "platform": "linux",
      "product": "linux",
      "release": "Debian 14",
      "fixedVersion": "7.0.3-1",
      "fix": "DEBIAN-CVE-2026-31702",
      "url": "https://patchblox.com/security/fix/linux/debian-cve-2026-31702",
      "released": "2026-05-15T16:01:09Z"
    }
  ],
  "noFixYet": [],
  "dataAsOf": "2026-11-08T06:59:42Z",
  "attribution": {
    "text": "Data: Patchblox Patch Radar",
    "url": "https://patchblox.com/security/patch-radar",
    "terms": "https://patchblox.com/security/patch-radar/use-the-data"
  }
}