{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-143166",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2026-12-03T03:10:28.356Z",
        "datePublished": "2026-12-03T09:20:03.682Z",
        "dateUpdated": "2026-12-03T09:20:03.682Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-12-03T09:20:03.682Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "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."
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/btrfs/bio.c"
                    ],
                    "versions": [
                        {
                            "version": "f8a53bb58ec7e2150f9b03f210675ba3e6d8b919",
                            "lessThan": "b252abcdaf20a365a03a360356c9fe336116c228",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "f8a53bb58ec7e2150f9b03f210675ba3e6d8b919",
                            "lessThan": "d72253b60d43901c873f0ada101ff4474774eecc",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "f8a53bb58ec7e2150f9b03f210675ba3e6d8b919",
                            "lessThan": "d27d0039bc1334be8a72c769e14c0b0c3efc317d",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/btrfs/bio.c"
                    ],
                    "versions": [
                        {
                            "version": "6.3",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "6.3",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.18.66",
                            "lessThanOrEqual": "6.18.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.3.7",
                            "lessThanOrEqual": "7.3.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.4-rc3",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.3",
                                    "versionEndExcluding": "6.18.66"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.3",
                                    "versionEndExcluding": "7.3.7"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.3",
                                    "versionEndExcluding": "7.4-rc3"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/b252abcdaf20a365a03a360356c9fe336116c228"
                },
                {
                    "url": "https://git.kernel.org/stable/c/d72253b60d43901c873f0ada101ff4474774eecc"
                },
                {
                    "url": "https://git.kernel.org/stable/c/d27d0039bc1334be8a72c769e14c0b0c3efc317d"
                }
            ],
            "title": "btrfs: fix bio counter and bioc leak when async checksumming fails",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}