CVE-2022-48733 (GCVE-0-2022-48733)

Vulnerability from cvelistv5 – Published: 2024-06-20 11:13 – Updated: 2026-08-05 08:52
VLAI
Title
btrfs: fix use-after-free after failure to create a snapshot
Summary
In the Linux kernel, the following vulnerability has been resolved: btrfs: fix use-after-free after failure to create a snapshot At ioctl.c:create_snapshot(), we allocate a pending snapshot structure and then attach it to the transaction's list of pending snapshots. After that we call btrfs_commit_transaction(), and if that returns an error we jump to 'fail' label, where we kfree() the pending snapshot structure. This can result in a later use-after-free of the pending snapshot: 1) We allocated the pending snapshot and added it to the transaction's list of pending snapshots; 2) We call btrfs_commit_transaction(), and it fails either at the first call to btrfs_run_delayed_refs() or btrfs_start_dirty_block_groups(). In both cases, we don't abort the transaction and we release our transaction handle. We jump to the 'fail' label and free the pending snapshot structure. We return with the pending snapshot still in the transaction's list; 3) Another task commits the transaction. This time there's no error at all, and then during the transaction commit it accesses a pointer to the pending snapshot structure that the snapshot creation task has already freed, resulting in a user-after-free. This issue could actually be detected by smatch, which produced the following warning: fs/btrfs/ioctl.c:843 create_snapshot() warn: '&pending_snapshot->list' not removed from list So fix this by not having the snapshot creation ioctl directly add the pending snapshot to the transaction's list. Instead add the pending snapshot to the transaction handle, and then at btrfs_commit_transaction() we add the snapshot to the list only when we can guarantee that any error returned after that point will result in a transaction abort, in which case the ioctl code can safely free the pending snapshot and no one can access it anymore.
SSVC
Exploitation: none Automatable: no Technical Impact: partial
CISA Coordinator (v2.0.3)
Assigner
Impacted products
Vendor Product Version
Linux Linux Affected: c37b2b6269ee4637fb7cdb5da0d1e47215d57ce2 , < 7e4c72dbaf62f8978af8321a24dbd35566d3a78a (git)
Affected: c37b2b6269ee4637fb7cdb5da0d1e47215d57ce2 , < a7b717fa15165d3d9245614680bebc48a52ac05d (git)
Affected: c37b2b6269ee4637fb7cdb5da0d1e47215d57ce2 , < 9372fa1d73da5f1673921e365d0cd2c27ec7adc2 (git)
Affected: c37b2b6269ee4637fb7cdb5da0d1e47215d57ce2 , < 28b21c558a3753171097193b6f6602a94169093a (git)
Create a notification for this product.
Linux Linux Affected: 3.7
Unaffected: 0 , < 3.7 (semver)
Unaffected: 5.10.226 , ≤ 5.10.* (semver)
Unaffected: 5.15.22 , ≤ 5.15.* (semver)
Unaffected: 5.16.8 , ≤ 5.16.* (semver)
Unaffected: 5.17 , ≤ * (original_commit_for_fix)
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2025-11-03T21:46:47.137Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/a7b717fa15165d3d9245614680bebc48a52ac05d"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/9372fa1d73da5f1673921e365d0cd2c27ec7adc2"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/28b21c558a3753171097193b6f6602a94169093a"
          },
          {
            "url": "https://lists.debian.org/debian-lts-announce/2024/10/msg00003.html"
          }
        ],
        "title": "CVE Program Container"
      },
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2022-48733",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-09-10T17:10:54.149503Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-09-11T17:34:48.869Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/btrfs/ioctl.c",
            "fs/btrfs/transaction.c",
            "fs/btrfs/transaction.h"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "7e4c72dbaf62f8978af8321a24dbd35566d3a78a",
              "status": "affected",
              "version": "c37b2b6269ee4637fb7cdb5da0d1e47215d57ce2",
              "versionType": "git"
            },
            {
              "lessThan": "a7b717fa15165d3d9245614680bebc48a52ac05d",
              "status": "affected",
              "version": "c37b2b6269ee4637fb7cdb5da0d1e47215d57ce2",
              "versionType": "git"
            },
            {
              "lessThan": "9372fa1d73da5f1673921e365d0cd2c27ec7adc2",
              "status": "affected",
              "version": "c37b2b6269ee4637fb7cdb5da0d1e47215d57ce2",
              "versionType": "git"
            },
            {
              "lessThan": "28b21c558a3753171097193b6f6602a94169093a",
              "status": "affected",
              "version": "c37b2b6269ee4637fb7cdb5da0d1e47215d57ce2",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/btrfs/ioctl.c",
            "fs/btrfs/transaction.c",
            "fs/btrfs/transaction.h"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "3.7"
            },
            {
              "lessThan": "3.7",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.226",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.22",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.16.*",
              "status": "unaffected",
              "version": "5.16.8",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "5.17",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.10.226",
                  "versionStartIncluding": "3.7",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.15.22",
                  "versionStartIncluding": "3.7",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.16.8",
                  "versionStartIncluding": "3.7",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "5.17",
                  "versionStartIncluding": "3.7",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: fix use-after-free after failure to create a snapshot\n\nAt ioctl.c:create_snapshot(), we allocate a pending snapshot structure and\nthen attach it to the transaction\u0027s list of pending snapshots. After that\nwe call btrfs_commit_transaction(), and if that returns an error we jump\nto \u0027fail\u0027 label, where we kfree() the pending snapshot structure. This can\nresult in a later use-after-free of the pending snapshot:\n\n1) We allocated the pending snapshot and added it to the transaction\u0027s\n   list of pending snapshots;\n\n2) We call btrfs_commit_transaction(), and it fails either at the first\n   call to btrfs_run_delayed_refs() or btrfs_start_dirty_block_groups().\n   In both cases, we don\u0027t abort the transaction and we release our\n   transaction handle. We jump to the \u0027fail\u0027 label and free the pending\n   snapshot structure. We return with the pending snapshot still in the\n   transaction\u0027s list;\n\n3) Another task commits the transaction. This time there\u0027s no error at\n   all, and then during the transaction commit it accesses a pointer\n   to the pending snapshot structure that the snapshot creation task\n   has already freed, resulting in a user-after-free.\n\nThis issue could actually be detected by smatch, which produced the\nfollowing warning:\n\n  fs/btrfs/ioctl.c:843 create_snapshot() warn: \u0027\u0026pending_snapshot-\u003elist\u0027 not removed from list\n\nSo fix this by not having the snapshot creation ioctl directly add the\npending snapshot to the transaction\u0027s list. Instead add the pending\nsnapshot to the transaction handle, and then at btrfs_commit_transaction()\nwe add the snapshot to the list only when we can guarantee that any error\nreturned after that point will result in a transaction abort, in which\ncase the ioctl code can safely free the pending snapshot and no one can\naccess it anymore."
        }
      ],
      "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 reached only via local BTRFS_IOC_SNAP_CREATE/SNAP_CREATE_V2 ioctls on a mounted btrfs filesystem; it is not reachable from network packet or remote filesystem protocol paths.\nAC:L - An unprivileged attacker who can create snapshots can drive the failing commit path and separately force another transaction commit, and between the free and reuse can spray the heap; the UAF does not depend on a race the attacker cannot influence.\nPR:L - Snapshot creation needs only directory write/exec permission and ownership of the source subvolume (inode_owner_or_capable), not real root or init-namespace CAP_SYS_ADMIN.\nUI:N - The attacker triggers the vulnerable ioctl themselves; no separate victim action is required.\nS:U - Impact is standard in-kernel memory corruption and privilege escalation within the host kernel\u0027s security authority, not a VM/IOMMU/sandbox boundary crossing.\nC:H - Use-after-free of btrfs_pending_snapshot leaves attacker-controllable freed memory that create_pending_snapshot later dereferences (dentry/dir/root/path/root_item), enabling arbitrary kernel read primitives.\nI:H - The same UAF of a pointer-rich structure during snapshot commit enables heap spraying and arbitrary write/control-flow hijacking.\nA:H - Dereferencing the freed pending snapshot during a later transaction commit can oops/panic the kernel even without a full exploit."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T08:52:01.350Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/7e4c72dbaf62f8978af8321a24dbd35566d3a78a"
        },
        {
          "url": "https://git.kernel.org/stable/c/a7b717fa15165d3d9245614680bebc48a52ac05d"
        },
        {
          "url": "https://git.kernel.org/stable/c/9372fa1d73da5f1673921e365d0cd2c27ec7adc2"
        },
        {
          "url": "https://git.kernel.org/stable/c/28b21c558a3753171097193b6f6602a94169093a"
        }
      ],
      "title": "btrfs: fix use-after-free after failure to create a snapshot",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2022-48733",
    "datePublished": "2024-06-20T11:13:20.737Z",
    "dateReserved": "2024-06-20T11:09:39.053Z",
    "dateUpdated": "2026-08-05T08:52:01.350Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2022-48733",
      "date": "2026-08-04",
      "epss": "0.0023",
      "percentile": "0.13919"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2022-48733\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-06-20T12:15:11.700\",\"lastModified\":\"2026-06-17T05:16:02.903\",\"vulnStatus\":\"Modified\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nbtrfs: fix use-after-free after failure to create a snapshot\\n\\nAt ioctl.c:create_snapshot(), we allocate a pending snapshot structure and\\nthen attach it to the transaction\u0027s list of pending snapshots. After that\\nwe call btrfs_commit_transaction(), and if that returns an error we jump\\nto \u0027fail\u0027 label, where we kfree() the pending snapshot structure. This can\\nresult in a later use-after-free of the pending snapshot:\\n\\n1) We allocated the pending snapshot and added it to the transaction\u0027s\\n   list of pending snapshots;\\n\\n2) We call btrfs_commit_transaction(), and it fails either at the first\\n   call to btrfs_run_delayed_refs() or btrfs_start_dirty_block_groups().\\n   In both cases, we don\u0027t abort the transaction and we release our\\n   transaction handle. We jump to the \u0027fail\u0027 label and free the pending\\n   snapshot structure. We return with the pending snapshot still in the\\n   transaction\u0027s list;\\n\\n3) Another task commits the transaction. This time there\u0027s no error at\\n   all, and then during the transaction commit it accesses a pointer\\n   to the pending snapshot structure that the snapshot creation task\\n   has already freed, resulting in a user-after-free.\\n\\nThis issue could actually be detected by smatch, which produced the\\nfollowing warning:\\n\\n  fs/btrfs/ioctl.c:843 create_snapshot() warn: \u0027\u0026pending_snapshot-\u003elist\u0027 not removed from list\\n\\nSo fix this by not having the snapshot creation ioctl directly add the\\npending snapshot to the transaction\u0027s list. Instead add the pending\\nsnapshot to the transaction handle, and then at btrfs_commit_transaction()\\nwe add the snapshot to the list only when we can guarantee that any error\\nreturned after that point will result in a transaction abort, in which\\ncase the ioctl code can safely free the pending snapshot and no one can\\naccess it anymore.\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se resolvi\u00f3 la siguiente vulnerabilidad: btrfs: corrige el use-after-free despu\u00e9s de una falla al crear una instant\u00e1nea En ioctl.c:create_snapshot(), asignamos una estructura de instant\u00e1nea pendiente y luego la adjuntamos a la lista de transacciones de instant\u00e1neas pendientes. Despu\u00e9s de eso, llamamos a btrfs_commit_transaction(), y si eso devuelve un error, saltamos a la etiqueta \u0027falla\u0027, donde liberamos() la estructura de instant\u00e1nea pendiente. Esto puede resultar en un uso posterior despu\u00e9s de la liberaci\u00f3n de la instant\u00e1nea pendiente: 1) Asignamos la instant\u00e1nea pendiente y la agregamos a la lista de instant\u00e1neas pendientes de la transacci\u00f3n; 2) Llamamos a btrfs_commit_transaction(), y falla en la primera llamada a btrfs_run_delayed_refs() o btrfs_start_dirty_block_groups(). En ambos casos, no abortamos la transacci\u00f3n y liberamos nuestro identificador de transacci\u00f3n. Saltamos a la etiqueta \u0027fallo\u0027 y liberamos la estructura de instant\u00e1nea pendiente. Regresamos con la instant\u00e1nea pendiente todav\u00eda en la lista de transacciones; 3) Otra tarea confirma la transacci\u00f3n. Esta vez no hay ning\u00fan error y luego, durante la confirmaci\u00f3n de la transacci\u00f3n, accede a un puntero a la estructura de instant\u00e1nea pendiente que la tarea de creaci\u00f3n de instant\u00e1nea ya ha liberado, lo que resulta en una liberaci\u00f3n de usuario. En realidad, este problema podr\u00eda ser detectado por smatch, que produjo la siguiente advertencia: fs/btrfs/ioctl.c:843 create_snapshot() advertencia: \u0027\u0026amp;pending_snapshot-\u0026gt;list\u0027 no se elimina de la lista. As\u00ed que solucione este problema al no tener el ioctl de creaci\u00f3n de instant\u00e1neas directamente agregue la instant\u00e1nea pendiente a la lista de transacciones. En su lugar, agregue la instant\u00e1nea pendiente al identificador de la transacci\u00f3n, y luego en btrfs_commit_transaction() agregamos la instant\u00e1nea a la lista solo cuando podamos garantizar que cualquier error devuelto despu\u00e9s de ese punto resultar\u00e1 en la cancelaci\u00f3n de la transacci\u00f3n, en cuyo caso el c\u00f3digo ioctl puede Libera la instant\u00e1nea pendiente y ya nadie podr\u00e1 acceder a ella.\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"fs/btrfs/ioctl.c\",\"fs/btrfs/transaction.c\",\"fs/btrfs/transaction.h\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"c37b2b6269ee4637fb7cdb5da0d1e47215d57ce2\",\"lessThan\":\"7e4c72dbaf62f8978af8321a24dbd35566d3a78a\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"c37b2b6269ee4637fb7cdb5da0d1e47215d57ce2\",\"lessThan\":\"a7b717fa15165d3d9245614680bebc48a52ac05d\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"c37b2b6269ee4637fb7cdb5da0d1e47215d57ce2\",\"lessThan\":\"9372fa1d73da5f1673921e365d0cd2c27ec7adc2\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"c37b2b6269ee4637fb7cdb5da0d1e47215d57ce2\",\"lessThan\":\"28b21c558a3753171097193b6f6602a94169093a\",\"versionType\":\"git\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"programFiles\":[\"fs/btrfs/ioctl.c\",\"fs/btrfs/transaction.c\",\"fs/btrfs/transaction.h\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"3.7\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"3.7\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"5.10.226\",\"lessThanOrEqual\":\"5.10.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"5.15.22\",\"lessThanOrEqual\":\"5.15.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"5.16.8\",\"lessThanOrEqual\":\"5.16.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"5.17\",\"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:H/I:H/A:H\",\"baseScore\":7.8,\"baseSeverity\":\"HIGH\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"HIGH\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":5.9}],\"ssvcV203\":[{\"source\":\"134c704f-9b21-4f2e-91b3-4a467353bcc0\",\"ssvcData\":{\"timestamp\":\"2024-09-10T17:10:54.149503Z\",\"id\":\"CVE-2022-48733\",\"options\":[{\"exploitation\":\"none\"},{\"automatable\":\"no\"},{\"technicalImpact\":\"partial\"}],\"role\":\"CISA Coordinator\",\"version\":\"2.0.3\"}}]},\"weaknesses\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-416\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionEndExcluding\":\"5.10.226\",\"matchCriteriaId\":\"2C67534D-8BBC-4069-8DEA-62295B16358C\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.11\",\"versionEndExcluding\":\"5.15.22\",\"matchCriteriaId\":\"74528AA6-B524-4C3F-B188-1194235FE47D\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"5.16\",\"versionEndExcluding\":\"5.16.8\",\"matchCriteriaId\":\"0623892A-E3E4-44E6-8A5E-39A0B47AF782\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:5.17:rc1:*:*:*:*:*:*\",\"matchCriteriaId\":\"7BD5F8D9-54FA-4CB0-B4F0-CB0471FDDB2D\"},{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:5.17:rc2:*:*:*:*:*:*\",\"matchCriteriaId\":\"E6E34B23-78B4-4516-9BD8-61B33F4AC49A\"}]}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/28b21c558a3753171097193b6f6602a94169093a\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/7e4c72dbaf62f8978af8321a24dbd35566d3a78a\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/9372fa1d73da5f1673921e365d0cd2c27ec7adc2\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/a7b717fa15165d3d9245614680bebc48a52ac05d\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/28b21c558a3753171097193b6f6602a94169093a\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/9372fa1d73da5f1673921e365d0cd2c27ec7adc2\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/a7b717fa15165d3d9245614680bebc48a52ac05d\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]},{\"url\":\"https://lists.debian.org/debian-lts-announce/2024/10/msg00003.html\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\"}]}}",
    "redhat_vex": {
      "aggregate_severity": "Moderate",
      "current_release_date": "2026-08-04T19:46:44+00:00",
      "cve": "CVE-2022-48733",
      "id": "CVE-2022-48733",
      "initial_release_date": "2022-01-01T00:00:00+00:00",
      "product_status:known_not_affected": "198",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: btrfs: fix use-after-free after failure to create a snapshot",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2022/cve-2022-48733.json",
      "version": "3"
    },
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CVE Program Container\", \"references\": [{\"url\": \"https://git.kernel.org/stable/c/a7b717fa15165d3d9245614680bebc48a52ac05d\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/9372fa1d73da5f1673921e365d0cd2c27ec7adc2\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/28b21c558a3753171097193b6f6602a94169093a\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://lists.debian.org/debian-lts-announce/2024/10/msg00003.html\"}], \"providerMetadata\": {\"orgId\": \"af854a3a-2127-422b-91ae-364da2661108\", \"shortName\": \"CVE\", \"dateUpdated\": \"2025-11-03T21:46:47.137Z\"}}, {\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2022-48733\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2024-09-10T17:10:54.149503Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2024-09-11T12:42:26.077Z\"}}], \"cna\": {\"title\": \"btrfs: fix use-after-free after failure to create a snapshot\", \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"c37b2b6269ee4637fb7cdb5da0d1e47215d57ce2\", \"lessThan\": \"7e4c72dbaf62f8978af8321a24dbd35566d3a78a\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"c37b2b6269ee4637fb7cdb5da0d1e47215d57ce2\", \"lessThan\": \"a7b717fa15165d3d9245614680bebc48a52ac05d\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"c37b2b6269ee4637fb7cdb5da0d1e47215d57ce2\", \"lessThan\": \"9372fa1d73da5f1673921e365d0cd2c27ec7adc2\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"c37b2b6269ee4637fb7cdb5da0d1e47215d57ce2\", \"lessThan\": \"28b21c558a3753171097193b6f6602a94169093a\", \"versionType\": \"git\"}], \"programFiles\": [\"fs/btrfs/ioctl.c\", \"fs/btrfs/transaction.c\", \"fs/btrfs/transaction.h\"], \"defaultStatus\": \"unaffected\"}, {\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"3.7\"}, {\"status\": \"unaffected\", \"version\": \"0\", \"lessThan\": \"3.7\", \"versionType\": \"semver\"}, {\"status\": \"unaffected\", \"version\": \"5.10.226\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"5.10.*\"}, {\"status\": \"unaffected\", \"version\": \"5.15.22\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"5.15.*\"}, {\"status\": \"unaffected\", \"version\": \"5.16.8\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"5.16.*\"}, {\"status\": \"unaffected\", \"version\": \"5.17\", \"versionType\": \"original_commit_for_fix\", \"lessThanOrEqual\": \"*\"}], \"programFiles\": [\"fs/btrfs/ioctl.c\", \"fs/btrfs/transaction.c\", \"fs/btrfs/transaction.h\"], \"defaultStatus\": \"affected\"}], \"references\": [{\"url\": \"https://git.kernel.org/stable/c/7e4c72dbaf62f8978af8321a24dbd35566d3a78a\"}, {\"url\": \"https://git.kernel.org/stable/c/a7b717fa15165d3d9245614680bebc48a52ac05d\"}, {\"url\": \"https://git.kernel.org/stable/c/9372fa1d73da5f1673921e365d0cd2c27ec7adc2\"}, {\"url\": \"https://git.kernel.org/stable/c/28b21c558a3753171097193b6f6602a94169093a\"}], \"x_generator\": {\"engine\": \"bippy-1.2.0\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"In the Linux kernel, the following vulnerability has been resolved:\\n\\nbtrfs: fix use-after-free after failure to create a snapshot\\n\\nAt ioctl.c:create_snapshot(), we allocate a pending snapshot structure and\\nthen attach it to the transaction\u0027s list of pending snapshots. After that\\nwe call btrfs_commit_transaction(), and if that returns an error we jump\\nto \u0027fail\u0027 label, where we kfree() the pending snapshot structure. This can\\nresult in a later use-after-free of the pending snapshot:\\n\\n1) We allocated the pending snapshot and added it to the transaction\u0027s\\n   list of pending snapshots;\\n\\n2) We call btrfs_commit_transaction(), and it fails either at the first\\n   call to btrfs_run_delayed_refs() or btrfs_start_dirty_block_groups().\\n   In both cases, we don\u0027t abort the transaction and we release our\\n   transaction handle. We jump to the \u0027fail\u0027 label and free the pending\\n   snapshot structure. We return with the pending snapshot still in the\\n   transaction\u0027s list;\\n\\n3) Another task commits the transaction. This time there\u0027s no error at\\n   all, and then during the transaction commit it accesses a pointer\\n   to the pending snapshot structure that the snapshot creation task\\n   has already freed, resulting in a user-after-free.\\n\\nThis issue could actually be detected by smatch, which produced the\\nfollowing warning:\\n\\n  fs/btrfs/ioctl.c:843 create_snapshot() warn: \u0027\u0026pending_snapshot-\u003elist\u0027 not removed from list\\n\\nSo fix this by not having the snapshot creation ioctl directly add the\\npending snapshot to the transaction\u0027s list. Instead add the pending\\nsnapshot to the transaction handle, and then at btrfs_commit_transaction()\\nwe add the snapshot to the list only when we can guarantee that any error\\nreturned after that point will result in a transaction abort, in which\\ncase the ioctl code can safely free the pending snapshot and no one can\\naccess it anymore.\"}], \"cpeApplicability\": [{\"nodes\": [{\"negate\": false, \"cpeMatch\": [{\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"5.10.226\", \"versionStartIncluding\": \"3.7\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"5.15.22\", \"versionStartIncluding\": \"3.7\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"5.16.8\", \"versionStartIncluding\": \"3.7\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"5.17\", \"versionStartIncluding\": \"3.7\"}], \"operator\": \"OR\"}]}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2025-12-23T13:20:07.583Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2022-48733\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2025-12-23T13:20:07.583Z\", \"dateReserved\": \"2024-06-20T11:09:39.053Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2024-06-20T11:13:20.737Z\", \"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…

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…