CVE-2022-49168 (GCVE-0-2022-49168)
Vulnerability from cvelistv5
Published
2025-02-26 01:55
Modified
2026-08-05 08:54
Summary
In the Linux kernel, the following vulnerability has been resolved: btrfs: do not clean up repair bio if submit fails The submit helper will always run bio_endio() on the bio if it fails to submit, so cleaning up the bio just leads to a variety of use-after-free and NULL pointer dereference bugs because we race with the endio function that is cleaning up the bio. Instead just return BLK_STS_OK as the repair function has to continue to process the rest of the pages, and the endio for the repair bio will do the appropriate cleanup for the page that it was given.
Impacted products
Vendor Product Version
Linux Linux Version: 6c387ab20db15f2bd448f7c508e2638101b16ea1
Version: 6c387ab20db15f2bd448f7c508e2638101b16ea1
Version: 6c387ab20db15f2bd448f7c508e2638101b16ea1
Version: 6c387ab20db15f2bd448f7c508e2638101b16ea1
Version: 6c387ab20db15f2bd448f7c508e2638101b16ea1
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "cvssV3_1": {
              "attackComplexity": "LOW",
              "attackVector": "LOCAL",
              "availabilityImpact": "HIGH",
              "baseScore": 7.8,
              "baseSeverity": "HIGH",
              "confidentialityImpact": "HIGH",
              "integrityImpact": "HIGH",
              "privilegesRequired": "LOW",
              "scope": "UNCHANGED",
              "userInteraction": "NONE",
              "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
              "version": "3.1"
            }
          },
          {
            "other": {
              "content": {
                "id": "CVE-2022-49168",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "total"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2025-02-27T18:17:10.610606Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "problemTypes": [
          {
            "descriptions": [
              {
                "cweId": "CWE-416",
                "description": "CWE-416 Use After Free",
                "lang": "en",
                "type": "CWE"
              }
            ]
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2025-02-27T18:22:34.706Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/btrfs/extent_io.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "e7e1d15d2bd8c373cf621614ddd17971a2132713",
              "status": "affected",
              "version": "6c387ab20db15f2bd448f7c508e2638101b16ea1",
              "versionType": "git"
            },
            {
              "lessThan": "7170875083254b51fcc5d67f96640977083f481e",
              "status": "affected",
              "version": "6c387ab20db15f2bd448f7c508e2638101b16ea1",
              "versionType": "git"
            },
            {
              "lessThan": "e76c78c48902dae6fa612749f59162bca0a79e0b",
              "status": "affected",
              "version": "6c387ab20db15f2bd448f7c508e2638101b16ea1",
              "versionType": "git"
            },
            {
              "lessThan": "d1cb11fb45ebbb1e7dfe5e9038b32ea72c184b14",
              "status": "affected",
              "version": "6c387ab20db15f2bd448f7c508e2638101b16ea1",
              "versionType": "git"
            },
            {
              "lessThan": "8cbc3001a3264d998d6b6db3e23f935c158abd4d",
              "status": "affected",
              "version": "6c387ab20db15f2bd448f7c508e2638101b16ea1",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/btrfs/extent_io.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "3.18"
            },
            {
              "lessThan": "3.18",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.248",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.184",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.16.*",
              "status": "unaffected",
              "version": "5.16.19",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.17.*",
              "status": "unaffected",
              "version": "5.17.2",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "5.18",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.248",
                  "versionStartIncluding": "3.18",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.184",
                  "versionStartIncluding": "3.18",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.16.19",
                  "versionStartIncluding": "3.18",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.17.2",
                  "versionStartIncluding": "3.18",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.18",
                  "versionStartIncluding": "3.18",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "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": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "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\u2014reasonable 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."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T08:54:12.330Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "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"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-49168",
    "datePublished": "2025-02-26T01:55:26.532Z",
    "dateReserved": "2025-02-26T01:49:39.278Z",
    "dateUpdated": "2026-08-05T08:54:12.330Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CISA ADP Vulnrichment\", \"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\"}]}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2025-02-27T18:17:11.935Z\"}}], \"cna\": {\"title\": \"btrfs: do not clean up repair bio if submit fails\", \"metrics\": [{\"cvssV3_1\": {\"version\": \"3.1\", \"baseScore\": 7.8, \"baseSeverity\": \"HIGH\", \"vectorString\": \"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H\"}, \"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\\u2014reasonable 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\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"6c387ab20db15f2bd448f7c508e2638101b16ea1\", \"lessThan\": \"e7e1d15d2bd8c373cf621614ddd17971a2132713\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"6c387ab20db15f2bd448f7c508e2638101b16ea1\", \"lessThan\": \"7170875083254b51fcc5d67f96640977083f481e\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"6c387ab20db15f2bd448f7c508e2638101b16ea1\", \"lessThan\": \"e76c78c48902dae6fa612749f59162bca0a79e0b\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"6c387ab20db15f2bd448f7c508e2638101b16ea1\", \"lessThan\": \"d1cb11fb45ebbb1e7dfe5e9038b32ea72c184b14\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"6c387ab20db15f2bd448f7c508e2638101b16ea1\", \"lessThan\": \"8cbc3001a3264d998d6b6db3e23f935c158abd4d\", \"versionType\": \"git\"}], \"programFiles\": [\"fs/btrfs/extent_io.c\"], \"defaultStatus\": \"unaffected\"}, {\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"3.18\"}, {\"status\": \"unaffected\", \"version\": \"0\", \"lessThan\": \"3.18\", \"versionType\": \"semver\"}, {\"status\": \"unaffected\", \"version\": \"5.10.248\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"5.10.*\"}, {\"status\": \"unaffected\", \"version\": \"5.15.184\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"5.15.*\"}, {\"status\": \"unaffected\", \"version\": \"5.16.19\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"5.16.*\"}, {\"status\": \"unaffected\", \"version\": \"5.17.2\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"5.17.*\"}, {\"status\": \"unaffected\", \"version\": \"5.18\", \"versionType\": \"original_commit_for_fix\", \"lessThanOrEqual\": \"*\"}], \"programFiles\": [\"fs/btrfs/extent_io.c\"], \"defaultStatus\": \"affected\"}], \"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\"}], \"x_generator\": {\"engine\": \"bippy-1.2.0\"}, \"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.\"}], \"cpeApplicability\": [{\"nodes\": [{\"negate\": false, \"cpeMatch\": [{\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"5.10.248\", \"versionStartIncluding\": \"3.18\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"5.15.184\", \"versionStartIncluding\": \"3.18\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"5.16.19\", \"versionStartIncluding\": \"3.18\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"5.17.2\", \"versionStartIncluding\": \"3.18\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"5.18\", \"versionStartIncluding\": \"3.18\"}], \"operator\": \"OR\"}]}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2026-08-05T08:54:12.330Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2022-49168\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2026-08-05T08:54:12.330Z\", \"dateReserved\": \"2025-02-26T01:49:39.278Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2025-02-26T01:55:26.532Z\", \"assignerShortName\": \"Linux\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…