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

CVE-2022-49996 (GCVE-0-2022-49996)

Vulnerability from cvelistv5 – Published: 2025-06-18 11:00 – Updated: 2026-05-23 15:23
VLAI
Title
btrfs: fix possible memory leak in btrfs_get_dev_args_from_path()
Summary
In the Linux kernel, the following vulnerability has been resolved: btrfs: fix possible memory leak in btrfs_get_dev_args_from_path() In btrfs_get_dev_args_from_path(), btrfs_get_bdev_and_sb() can fail if the path is invalid. In this case, btrfs_get_dev_args_from_path() returns directly without freeing args->uuid and args->fsid allocated before, which causes memory leak. To fix these possible leaks, when btrfs_get_bdev_and_sb() fails, btrfs_put_dev_args_from_path() is called to clean up the memory.
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: 321a81835b4aed4f717f89921286f6544ffa8be9 , < 5f52402c77013e4a826394b807dd5ea4dc83bd72 (git)
Affected: faa775c41d655a4786e9d53cb075a77bb5a75f66 , < 4b124ad87244cd7f0883c5eaa38d2326b2154cad (git)
Affected: faa775c41d655a4786e9d53cb075a77bb5a75f66 , < 9ea0106a7a3d8116860712e3f17cd52ce99f6707 (git)
Affected: 5.15.54 , < 5.15.64 (semver)
guessed Create a notification for this product.
Linux Linux Affected: 5.16
Unaffected: 0 , < 5.16 (semver)
Unaffected: 5.15.64 , ≤ 5.15.* (semver)
Unaffected: 5.19.6 , ≤ 5.19.* (semver)
Unaffected: 6.0 , ≤ * (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": "5f52402c77013e4a826394b807dd5ea4dc83bd72",
              "status": "affected",
              "version": "321a81835b4aed4f717f89921286f6544ffa8be9",
              "versionType": "git"
            },
            {
              "lessThan": "4b124ad87244cd7f0883c5eaa38d2326b2154cad",
              "status": "affected",
              "version": "faa775c41d655a4786e9d53cb075a77bb5a75f66",
              "versionType": "git"
            },
            {
              "lessThan": "9ea0106a7a3d8116860712e3f17cd52ce99f6707",
              "status": "affected",
              "version": "faa775c41d655a4786e9d53cb075a77bb5a75f66",
              "versionType": "git"
            },
            {
              "lessThan": "5.15.64",
              "status": "affected",
              "version": "5.15.54",
              "versionType": "semver"
            }
          ]
        },
        {
          "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": "5.16"
            },
            {
              "lessThan": "5.16",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.64",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.19.*",
              "status": "unaffected",
              "version": "5.19.6",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.0",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.64",
                  "versionStartIncluding": "5.15.54",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.19.6",
                  "versionStartIncluding": "5.16",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.0",
                  "versionStartIncluding": "5.16",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: fix possible memory leak in btrfs_get_dev_args_from_path()\n\nIn btrfs_get_dev_args_from_path(), btrfs_get_bdev_and_sb() can fail if\nthe path is invalid. In this case, btrfs_get_dev_args_from_path()\nreturns directly without freeing args-\u003euuid and args-\u003efsid allocated\nbefore, which causes memory leak.\n\nTo fix these possible leaks, when btrfs_get_bdev_and_sb() fails,\nbtrfs_put_dev_args_from_path() is called to clean up the memory."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-05-23T15:23:31.343Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/5f52402c77013e4a826394b807dd5ea4dc83bd72"
        },
        {
          "url": "https://git.kernel.org/stable/c/4b124ad87244cd7f0883c5eaa38d2326b2154cad"
        },
        {
          "url": "https://git.kernel.org/stable/c/9ea0106a7a3d8116860712e3f17cd52ce99f6707"
        }
      ],
      "title": "btrfs: fix possible memory leak in btrfs_get_dev_args_from_path()",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-49996",
    "datePublished": "2025-06-18T11:00:56.175Z",
    "dateReserved": "2025-06-18T10:57:27.387Z",
    "dateUpdated": "2026-05-23T15:23:31.343Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2022-49996",
      "date": "2026-09-16",
      "epss": "0.0022",
      "percentile": "0.12705"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2022-49996\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-06-18T11:15:27.337\",\"lastModified\":\"2026-06-17T05:19:42.540\",\"vulnStatus\":\"Analyzed\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nbtrfs: fix possible memory leak in btrfs_get_dev_args_from_path()\\n\\nIn btrfs_get_dev_args_from_path(), btrfs_get_bdev_and_sb() can fail if\\nthe path is invalid. In this case, btrfs_get_dev_args_from_path()\\nreturns directly without freeing args-\u003euuid and args-\u003efsid allocated\\nbefore, which causes memory leak.\\n\\nTo fix these possible leaks, when btrfs_get_bdev_and_sb() fails,\\nbtrfs_put_dev_args_from_path() is called to clean up the memory.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: btrfs: se corrige una posible p\u00e9rdida de memoria en btrfs_get_dev_args_from_path(). En btrfs_get_dev_args_from_path(), btrfs_get_bdev_and_sb() puede fallar si la ruta no es v\u00e1lida. En este caso, btrfs_get_dev_args_from_path() retorna directamente sin liberar los argumentos args-\u0026gt;uuid y args-\u0026gt;fsid asignados previamente, lo que provoca una p\u00e9rdida de memoria. Para corregir estas posibles p\u00e9rdidas, cuando btrfs_get_bdev_and_sb() falla, se llama a btrfs_put_dev_args_from_path() para limpiar la memoria.\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"fs/btrfs/volumes.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"321a81835b4aed4f717f89921286f6544ffa8be9\",\"lessThan\":\"5f52402c77013e4a826394b807dd5ea4dc83bd72\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"faa775c41d655a4786e9d53cb075a77bb5a75f66\",\"lessThan\":\"4b124ad87244cd7f0883c5eaa38d2326b2154cad\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"faa775c41d655a4786e9d53cb075a77bb5a75f66\",\"lessThan\":\"9ea0106a7a3d8116860712e3f17cd52ce99f6707\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"5.15.54\",\"lessThan\":\"5.15.64\",\"versionType\":\"semver\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"programFiles\":[\"fs/btrfs/volumes.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"5.16\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"5.16\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"5.15.64\",\"lessThanOrEqual\":\"5.15.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"5.19.6\",\"lessThanOrEqual\":\"5.19.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.0\",\"lessThanOrEqual\":\"*\",\"versionType\":\"original_commit_for_fix\",\"status\":\"unaffected\"}]}]}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H\",\"baseScore\":5.5,\"baseSeverity\":\"MEDIUM\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"NONE\",\"integrityImpact\":\"NONE\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":3.6}]},\"weaknesses\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-401\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.15.54\",\"versionEndExcluding\":\"5.15.64\",\"matchCriteriaId\":\"CE945E53-BEF5-4654-8E87-808C7B7233C4\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.16\",\"versionEndExcluding\":\"5.19.6\",\"matchCriteriaId\":\"89E99903-E16D-475D-954B-2BAC46C98262\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.0:rc1:*:*:*:*:*:*\",\"matchCriteriaId\":\"E8BD11A3-8643-49B6-BADE-5029A0117325\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:6.0:rc2:*:*:*:*:*:*\",\"matchCriteriaId\":\"5F0AD220-F6A9-4012-8636-155F1B841FAD\"}]}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/4b124ad87244cd7f0883c5eaa38d2326b2154cad\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/5f52402c77013e4a826394b807dd5ea4dc83bd72\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/9ea0106a7a3d8116860712e3f17cd52ce99f6707\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]}]}}",
    "redhat_vex": {
      "aggregate_severity": "None",
      "current_release_date": "2026-06-30T10:29:27+00:00",
      "cve": "CVE-2022-49996",
      "id": "CVE-2022-49996",
      "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: btrfs: fix possible memory leak in btrfs_get_dev_args_from_path()",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2022/cve-2022-49996.json",
      "version": "3"
    }
  }
}



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…