{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "f8a53bb58ec7e2150f9b03f210675ba3e6d8b919"
            },
            {
              "fixed": "b252abcdaf20a365a03a360356c9fe336116c228"
            },
            {
              "fixed": "d72253b60d43901c873f0ada101ff4474774eecc"
            },
            {
              "fixed": "d27d0039bc1334be8a72c769e14c0b0c3efc317d"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "6.3.0"
            },
            {
              "fixed": "6.18.66"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.19.0"
            },
            {
              "fixed": "7.3.7"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/143xxx/CVE-2026-143166.json"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: fix bio counter and bioc leak when async checksumming fails\n\nA single failed checksum allocation can make a later device replace\nhang forever.  btrfs_submit_chunk() takes a dev-replace bio counter\nreference and a bioc before it hands a write to the checksum worker.\nIf the checksum fails there (e.g., its allocation fails),\nrun_one_async_done() ends the bio but drops neither.  The counter then\nnever gets back to zero and the next replace waits for it:\n\n  [ 8.369] BTRFS info (device ram0): dev_replace from /dev/ram0 (devid 1) to /dev/ram1 finished\n  [41.534] INFO: task btrfscsum:80 blocked for more than 20 seconds.\n  [41.534]  btrfs_rm_dev_replace_blocked+0x135/0x180\n  [41.534]  btrfs_dev_replace_finishing+0xefe/0x13b0\n\nThe worker is only used when CONFIG_BTRFS_EXPERIMENTAL is off and the\nchecksum isn't a fast one, e.g., sha256.  We hit it on a sha256\nfilesystem.\n\nWe put the bioc and drop the counter in that error branch.  We also\nput the bioc on the synchronous error path and on the btrfs_split_bio()\nerror path, which both only drop the counter.  With the fix, the\nreplace doesn't hang anymore.\n\nThis bug was identified and confirmed with the help of fault-injection\ntesting on a deterministic hypervisor currently under development.  Our\nC reproducer however hits it within about 35s.",
  "id": "CVE-2026-143166",
  "modified": "2026-12-03T10:45:55.752864344Z",
  "published": "2026-12-03T09:20:03.682Z",
  "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/b252abcdaf20a365a03a360356c9fe336116c228"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/d27d0039bc1334be8a72c769e14c0b0c3efc317d"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/d72253b60d43901c873f0ada101ff4474774eecc"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/143xxx/CVE-2026-143166.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-143166"
    }
  ],
  "schema_version": "1.9.2",
  "summary": "btrfs: fix bio counter and bioc leak when async checksumming fails"
}