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
Assigner
Linux CNA
Impacted products
Vendor Product Version
Linux Linux Affected: adfb69af7d8cb6a3958f75aad1ef4bc96891d116 , < b8e7ed42bc3ca0d0e4191ee394d34962d3624c22 (git)
Affected: adfb69af7d8cb6a3958f75aad1ef4bc96891d116 , < fce3713197ebba239e1c7e02174ed216ea1ee014 (git)
Affected: adfb69af7d8cb6a3958f75aad1ef4bc96891d116 , < 169a4cf46882974d4db6d85eb623ec898e51bbc0 (git)
Affected: adfb69af7d8cb6a3958f75aad1ef4bc96891d116 , < 1742e1c90c3da344f3bb9b1f1309b3f47482756a (git)
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)
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-11-19",
      "epss": "0.00173",
      "percentile": "0.06847"
    },
    "redhat_vex": {
      "aggregate_severity": "Moderate",
      "current_release_date": "2026-11-05T10:14:24+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": "200",
      "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"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

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.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    Loading…

    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.