GCVE Workshop - 22 September 2026 (14:00-18:00), Luxembourg Before The Vulnopticon Conference - Registration

CVE-2022-50300 (GCVE-0-2022-50300)

Vulnerability from cvelistv5 – Published: 2025-09-15 14:45 – Updated: 2026-08-05 08:58
VLAI
Title
btrfs: fix extent map use-after-free when handling missing device in read_one_chunk
Summary
In the Linux kernel, the following vulnerability has been resolved: btrfs: fix extent map use-after-free when handling missing device in read_one_chunk Store the error code before freeing the extent_map. Though it's reference counted structure, in that function it's the first and last allocation so this would lead to a potential use-after-free. The error can happen eg. when chunk is stored on a missing device and the degraded mount option is missing. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=216721
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: adfb69af7d8cb6a3958f75aad1ef4bc96891d116 , < b8e7ed42bc3ca0d0e4191ee394d34962d3624c22 (git)
Affected: adfb69af7d8cb6a3958f75aad1ef4bc96891d116 , < fce3713197ebba239e1c7e02174ed216ea1ee014 (git)
Affected: adfb69af7d8cb6a3958f75aad1ef4bc96891d116 , < 169a4cf46882974d4db6d85eb623ec898e51bbc0 (git)
Affected: adfb69af7d8cb6a3958f75aad1ef4bc96891d116 , < 1742e1c90c3da344f3bb9b1f1309b3f47482756a (git)
guessed Create a notification for this product.
Linux Linux Affected: 4.15
Unaffected: 0 , < 4.15 (semver)
Unaffected: 5.15.87 , ≤ 5.15.* (semver)
Unaffected: 6.0.18 , ≤ 6.0.* (semver)
Unaffected: 6.1.4 , ≤ 6.1.* (semver)
Unaffected: 6.2 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/btrfs/volumes.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "b8e7ed42bc3ca0d0e4191ee394d34962d3624c22",
              "status": "affected",
              "version": "adfb69af7d8cb6a3958f75aad1ef4bc96891d116",
              "versionType": "git"
            },
            {
              "lessThan": "fce3713197ebba239e1c7e02174ed216ea1ee014",
              "status": "affected",
              "version": "adfb69af7d8cb6a3958f75aad1ef4bc96891d116",
              "versionType": "git"
            },
            {
              "lessThan": "169a4cf46882974d4db6d85eb623ec898e51bbc0",
              "status": "affected",
              "version": "adfb69af7d8cb6a3958f75aad1ef4bc96891d116",
              "versionType": "git"
            },
            {
              "lessThan": "1742e1c90c3da344f3bb9b1f1309b3f47482756a",
              "status": "affected",
              "version": "adfb69af7d8cb6a3958f75aad1ef4bc96891d116",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/btrfs/volumes.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "4.15"
            },
            {
              "lessThan": "4.15",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.87",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.0.*",
              "status": "unaffected",
              "version": "6.0.18",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.4",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.2",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.87",
                  "versionStartIncluding": "4.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.0.18",
                  "versionStartIncluding": "4.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.1.4",
                  "versionStartIncluding": "4.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.2",
                  "versionStartIncluding": "4.15",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: fix extent map use-after-free when handling missing device in read_one_chunk\n\nStore the error code before freeing the extent_map. Though it\u0027s\nreference counted structure, in that function it\u0027s the first and last\nallocation so this would lead to a potential use-after-free.\n\nThe error can happen eg. when chunk is stored on a missing device and\nthe degraded mount option is missing.\n\nBugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=216721"
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - The vulnerable path runs only during btrfs mount (open_ctree \u2192 btrfs_read_sys_array/btrfs_read_chunk_tree \u2192 read_one_chunk), reached via a local mount of a crafted or incomplete multi-device image, not via network packet processing.\nAC:L - An attacker can reliably trigger the UAF by supplying a filesystem whose chunk stripe references a missing device and ensuring mount without the non-default degraded option; the freshly allocated extent_map always has refcount 1 so free_extent_map unconditionally frees map before the PTR_ERR read.\nPR:N - btrfs lacks FS_USERNS_MOUNT so the attacker need not hold privileges on the victim host; crafting and delivering a malicious image (USB, download, shared disk) is sufficient, matching other mount-time filesystem UAF scores.\nUI:R - Exploitation requires a user or administrator to mount the attacker-controlled btrfs image, which is the necessary interaction that enters open_ctree and reaches read_one_chunk.\nS:U - Impact is confined to kernel memory in the host\u0027s btrfs mount path; this is standard kernel memory corruption without crossing a VM, IOMMU, or other security authority boundary.\nC:H - This is a genuine use-after-free of the kmalloc\u0027d map_lookup and extent_map objects; per CVSS kernel guidance a UAF enables reclaim and disclosure of freed object contents for arbitrary kernel memory read.\nI:H - Use-after-free of heap objects during mount enables heap grooming and write/control-flow primitives once the freed map_lookup/extent_map slabs are reused, so integrity impact is High.\nA:H - The UAF on freed map_lookup memory can cause kernel oops/panic (including via inconsistent mount continuation if a reused object yields a misleading return code), so availability impact is High."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T08:58:04.535Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/b8e7ed42bc3ca0d0e4191ee394d34962d3624c22"
        },
        {
          "url": "https://git.kernel.org/stable/c/fce3713197ebba239e1c7e02174ed216ea1ee014"
        },
        {
          "url": "https://git.kernel.org/stable/c/169a4cf46882974d4db6d85eb623ec898e51bbc0"
        },
        {
          "url": "https://git.kernel.org/stable/c/1742e1c90c3da344f3bb9b1f1309b3f47482756a"
        }
      ],
      "title": "btrfs: fix extent map use-after-free when handling missing device in read_one_chunk",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-50300",
    "datePublished": "2025-09-15T14:45:55.896Z",
    "dateReserved": "2025-09-15T14:18:36.812Z",
    "dateUpdated": "2026-08-05T08:58:04.535Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2022-50300",
      "date": "2026-09-17",
      "epss": "0.00162",
      "percentile": "0.05861"
    },
    "nvd": {
      "cve": {
        "affected": [
          {
            "affectedData": [
              {
                "defaultStatus": "unaffected",
                "product": "Linux",
                "programFiles": [
                  "fs/btrfs/volumes.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "lessThan": "b8e7ed42bc3ca0d0e4191ee394d34962d3624c22",
                    "status": "affected",
                    "version": "adfb69af7d8cb6a3958f75aad1ef4bc96891d116",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "fce3713197ebba239e1c7e02174ed216ea1ee014",
                    "status": "affected",
                    "version": "adfb69af7d8cb6a3958f75aad1ef4bc96891d116",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "169a4cf46882974d4db6d85eb623ec898e51bbc0",
                    "status": "affected",
                    "version": "adfb69af7d8cb6a3958f75aad1ef4bc96891d116",
                    "versionType": "git"
                  },
                  {
                    "lessThan": "1742e1c90c3da344f3bb9b1f1309b3f47482756a",
                    "status": "affected",
                    "version": "adfb69af7d8cb6a3958f75aad1ef4bc96891d116",
                    "versionType": "git"
                  }
                ]
              },
              {
                "defaultStatus": "affected",
                "product": "Linux",
                "programFiles": [
                  "fs/btrfs/volumes.c"
                ],
                "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                "vendor": "Linux",
                "versions": [
                  {
                    "status": "affected",
                    "version": "4.15"
                  },
                  {
                    "lessThan": "4.15",
                    "status": "unaffected",
                    "version": "0",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "5.15.*",
                    "status": "unaffected",
                    "version": "5.15.87",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.0.*",
                    "status": "unaffected",
                    "version": "6.0.18",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "6.1.*",
                    "status": "unaffected",
                    "version": "6.1.4",
                    "versionType": "semver"
                  },
                  {
                    "lessThanOrEqual": "*",
                    "status": "unaffected",
                    "version": "6.2",
                    "versionType": "original_commit_for_fix"
                  }
                ]
              }
            ],
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67"
          }
        ],
        "configurations": [
          {
            "nodes": [
              {
                "cpeMatch": [
                  {
                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                    "matchCriteriaId": "B5E4BB44-E0A4-4635-8AF7-4A3DF104A47D",
                    "versionEndExcluding": "5.15.87",
                    "versionStartIncluding": "4.15",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                    "matchCriteriaId": "08D38C5F-9644-4549-BBA6-F0860F024D14",
                    "versionEndExcluding": "6.0.18",
                    "versionStartIncluding": "5.16",
                    "vulnerable": true
                  },
                  {
                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                    "matchCriteriaId": "BC4189D9-5478-4E88-A78D-9C1DE29B217C",
                    "versionEndExcluding": "6.1.4",
                    "versionStartIncluding": "6.1",
                    "vulnerable": true
                  }
                ],
                "negate": false,
                "operator": "OR"
              }
            ]
          }
        ],
        "cveTags": [],
        "descriptions": [
          {
            "lang": "en",
            "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: fix extent map use-after-free when handling missing device in read_one_chunk\n\nStore the error code before freeing the extent_map. Though it\u0027s\nreference counted structure, in that function it\u0027s the first and last\nallocation so this would lead to a potential use-after-free.\n\nThe error can happen eg. when chunk is stored on a missing device and\nthe degraded mount option is missing.\n\nBugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=216721"
          }
        ],
        "id": "CVE-2022-50300",
        "lastModified": "2026-08-04T10:18:10.140",
        "metrics": {
          "cvssMetricV31": [
            {
              "cvssData": {
                "attackComplexity": "LOW",
                "attackVector": "LOCAL",
                "availabilityImpact": "HIGH",
                "baseScore": 7.8,
                "baseSeverity": "HIGH",
                "confidentialityImpact": "HIGH",
                "integrityImpact": "HIGH",
                "privilegesRequired": "NONE",
                "scope": "UNCHANGED",
                "userInteraction": "REQUIRED",
                "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
                "version": "3.1"
              },
              "exploitabilityScore": 1.8,
              "impactScore": 5.9,
              "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
              "type": "Secondary"
            },
            {
              "cvssData": {
                "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"
              },
              "exploitabilityScore": 1.8,
              "impactScore": 5.9,
              "source": "nvd@nist.gov",
              "type": "Primary"
            }
          ]
        },
        "published": "2025-09-15T15:15:41.483",
        "references": [
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "tags": [
              "Patch"
            ],
            "url": "https://git.kernel.org/stable/c/169a4cf46882974d4db6d85eb623ec898e51bbc0"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "tags": [
              "Patch"
            ],
            "url": "https://git.kernel.org/stable/c/1742e1c90c3da344f3bb9b1f1309b3f47482756a"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "tags": [
              "Patch"
            ],
            "url": "https://git.kernel.org/stable/c/b8e7ed42bc3ca0d0e4191ee394d34962d3624c22"
          },
          {
            "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
            "tags": [
              "Patch"
            ],
            "url": "https://git.kernel.org/stable/c/fce3713197ebba239e1c7e02174ed216ea1ee014"
          }
        ],
        "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "vulnStatus": "Modified",
        "weaknesses": [
          {
            "description": [
              {
                "lang": "en",
                "value": "CWE-416"
              }
            ],
            "source": "nvd@nist.gov",
            "type": "Primary"
          }
        ]
      }
    },
    "redhat_vex": {
      "aggregate_severity": "Moderate",
      "current_release_date": "2026-08-04T19:40:14+00:00",
      "cve": "CVE-2022-50300",
      "id": "CVE-2022-50300",
      "initial_release_date": "2022-01-01T00:00:00+00:00",
      "product_status:known_not_affected": "274",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: Linux kernel: Denial of Service in btrfs due to use-after-free vulnerability",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2022/cve-2022-50300.json",
      "version": "3"
    },
    "suse_vex": {
      "aggregate_severity": "moderate",
      "current_release_date": "2026-09-01T01:24:53Z",
      "cve": "CVE-2022-50300",
      "id": "CVE-2022-50300",
      "initial_release_date": "2025-09-15T23:29:32Z",
      "product_status:known_affected": "130",
      "product_status:known_not_affected": "393",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2022-50300",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/cve-2022-50300.json",
      "version": "10"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…