{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2022-49168",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-02-26T01:49:39.278Z",
        "datePublished": "2025-02-26T01:55:26.532Z",
        "dateUpdated": "2026-08-05T08:54:12.330Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T08:54:12.330Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: do not clean up repair bio if submit fails\n\nThe submit helper will always run bio_endio() on the bio if it fails to\nsubmit, so cleaning up the bio just leads to a variety of use-after-free\nand NULL pointer dereference bugs because we race with the endio\nfunction that is cleaning up the bio.  Instead just return BLK_STS_OK as\nthe repair function has to continue to process the rest of the pages,\nand the endio for the repair bio will do the appropriate cleanup for the\npage that it was given."
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                        "baseScore": 7.8,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:L - The bug is in btrfs read-repair (`btrfs_repair_one_sector` via buffered `end_bio_extent_readpage`/`submit_read_repair` or DIO `btrfs_check_read_dio_bio`), reached only through local VFS reads on a mounted btrfs volume, not through a network protocol handler.\nAC:L - On a multi-copy deployment (RAID1/DUP/RAID10—reasonable for btrfs), once repair runs, a failing `btrfs_submit_data_bio` (e.g. ENOMEM in `btrfs_bio_wq_end_io`) deterministically double-frees via `bio_endio` plus `free_io_failure`/`bio_put`; the attacker can drive memory pressure and does not need an uncontrolled race to hit the UAF.\nPR:L - An unprivileged local user who can read files on an already-mounted multi-copy btrfs filesystem can exercise the repair path; btrfs is not user-ns mountable here, but no real root/init-namespace admin capability is required to trigger the bug.\nUI:N - No separate victim action is required once the filesystem is mounted; the attacker triggers the path by reading (and optionally stressing memory) without needing another user to open or mount anything.\nS:U - Impact remains within the local kernel/OS authority as standard kernel memory corruption/DoS; there is no VM escape, IOMMU bypass, or other cross-boundary effect.\nC:H - Double cleanup yields use-after-free of the repair bio and/or `io_failure_record` (via `bio_put` and `kfree` in `free_io_failure` while endio also tears them down), which enables reclaim and arbitrary read primitives.\nI:H - The same bio/failrec UAF and concurrent endio cleanup is heap memory corruption that can be leveraged for write primitives and control-flow hijacking.\nA:H - The commit documents UAF and NULL dereferences from racing endio cleanup; double `bio_put`/`free_io_failure` reliably causes kernel oops/panic or equivalent denial of service."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/btrfs/extent_io.c"
                    ],
                    "versions": [
                        {
                            "version": "6c387ab20db15f2bd448f7c508e2638101b16ea1",
                            "lessThan": "e7e1d15d2bd8c373cf621614ddd17971a2132713",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "6c387ab20db15f2bd448f7c508e2638101b16ea1",
                            "lessThan": "7170875083254b51fcc5d67f96640977083f481e",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "6c387ab20db15f2bd448f7c508e2638101b16ea1",
                            "lessThan": "e76c78c48902dae6fa612749f59162bca0a79e0b",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "6c387ab20db15f2bd448f7c508e2638101b16ea1",
                            "lessThan": "d1cb11fb45ebbb1e7dfe5e9038b32ea72c184b14",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "6c387ab20db15f2bd448f7c508e2638101b16ea1",
                            "lessThan": "8cbc3001a3264d998d6b6db3e23f935c158abd4d",
                            "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/extent_io.c"
                    ],
                    "versions": [
                        {
                            "version": "3.18",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "3.18",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.248",
                            "lessThanOrEqual": "5.10.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.184",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.16.19",
                            "lessThanOrEqual": "5.16.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.17.2",
                            "lessThanOrEqual": "5.17.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.18",
                            "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": "3.18",
                                    "versionEndExcluding": "5.10.248"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.18",
                                    "versionEndExcluding": "5.15.184"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.18",
                                    "versionEndExcluding": "5.16.19"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.18",
                                    "versionEndExcluding": "5.17.2"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.18",
                                    "versionEndExcluding": "5.18"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/e7e1d15d2bd8c373cf621614ddd17971a2132713"
                },
                {
                    "url": "https://git.kernel.org/stable/c/7170875083254b51fcc5d67f96640977083f481e"
                },
                {
                    "url": "https://git.kernel.org/stable/c/e76c78c48902dae6fa612749f59162bca0a79e0b"
                },
                {
                    "url": "https://git.kernel.org/stable/c/d1cb11fb45ebbb1e7dfe5e9038b32ea72c184b14"
                },
                {
                    "url": "https://git.kernel.org/stable/c/8cbc3001a3264d998d6b6db3e23f935c158abd4d"
                }
            ],
            "title": "btrfs: do not clean up repair bio if submit fails",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        },
        "adp": [
            {
                "metrics": [
                    {
                        "cvssV3_1": {
                            "scope": "UNCHANGED",
                            "version": "3.1",
                            "baseScore": 7.8,
                            "attackVector": "LOCAL",
                            "baseSeverity": "HIGH",
                            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                            "integrityImpact": "HIGH",
                            "userInteraction": "NONE",
                            "attackComplexity": "LOW",
                            "availabilityImpact": "HIGH",
                            "privilegesRequired": "LOW",
                            "confidentialityImpact": "HIGH"
                        }
                    },
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "id": "CVE-2022-49168",
                                "role": "CISA Coordinator",
                                "options": [
                                    {
                                        "Exploitation": "none"
                                    },
                                    {
                                        "Automatable": "no"
                                    },
                                    {
                                        "Technical Impact": "total"
                                    }
                                ],
                                "version": "2.0.3",
                                "timestamp": "2025-02-27T18:17:10.610606Z"
                            }
                        }
                    }
                ],
                "problemTypes": [
                    {
                        "descriptions": [
                            {
                                "lang": "en",
                                "type": "CWE",
                                "cweId": "CWE-416",
                                "description": "CWE-416 Use After Free"
                            }
                        ]
                    }
                ],
                "title": "CISA ADP Vulnrichment",
                "providerMetadata": {
                    "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
                    "shortName": "CISA-ADP",
                    "dateUpdated": "2025-02-27T18:22:34.706Z"
                }
            }
        ]
    }
}