VDB

UBUNTU-CVE-2022-48733

UBUNTU-CVE-2022-48733 PUBLISHED CVSS 7.300000190734863 HIGH

Record from OSV · Published June 20, 2024

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
linux-aws-fipsUbuntu:Pro:FIPS-updates:20.04:LTS5.4.0-1136.146+fips1
linux-azureUbuntu:Pro:16.04:LTS4.15.0-1183.198~16.04.1
linux-aws-fipsUbuntu:Pro:FIPS-updates:18.04:LTS4.15.0-2113.119
linux-azureUbuntu:20.04:LTS5.4.0-1142.149
linux-ibm-5.4Ubuntu:Pro:18.04:LTS5.4.0-1083.88~18.04.1
linux-azure-fipsUbuntu:Pro:FIPS-updates:18.04:LTS4.15.0-2092.98
linux-aws-hweUbuntu:Pro:16.04:LTS4.15.0-1175.188~16.04.1
linux-raspi-5.4Ubuntu:Pro:18.04:LTS5.4.0-1120.132~18.04.1
linux-gcpUbuntu:Pro:16.04:LTS4.15.0-1168.185~16.04.1
linux-gcp-4.15Ubuntu:Pro:18.04:LTS4.15.0-1168.185
linux-oracleUbuntu:20.04:LTS5.4.0-1135.144
linux-hweUbuntu:Pro:16.04:LTS4.15.0-231.243~16.04.1

24 more packages have a fixed version. See every fix in Lookup.

Risk scores

CVSS 4.0
7.300000190734863
CVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Affected products

VendorProductVersions
Ubuntu:22.04:LTSlinux-oem-6.06.0.0-1021.21, 0, 6.0.0-1006.6
Ubuntu:20.04:LTSlinux-gkeop5.4.0-1091.95, 0, 5.4.0-1008.9
Ubuntu:Pro:FIPS:18.04:LTSlinux-azure-fips4.15.0-1002.2, 0
Ubuntu:20.04:LTSlinux-riscv-5.85.8.0-14.16~20.04.3, 5.8.0-16.18~20.04.1, 5.8.0-17.19~20.04.1
Ubuntu:22.04:LTSlinux-nvidia-6.20, 6.2.0-1015.15, 6.2.0-1013.13
Ubuntu:18.04:LTSlinux-azure5.0.0-1035.37, 5.0.0-1036.38, 4.18.0-1011.11~18.04.1
Ubuntu:Pro:FIPS-updates:20.04:LTSlinux-aws-fips5.4.0-1088.96+fips1, 5.4.0-1086.93+fips1, 5.4.0-1085.92+fips1
Ubuntu:20.04:LTSlinux-gke5.4.0-1067.70, 0, 5.4.0-1033.35
Ubuntu:Pro:16.04:LTSlinux-azure4.15.0-1165.180~16.04.1, 4.11.0-1015.15, 4.11.0-1016.16
Ubuntu:Pro:FIPS:20.04:LTSlinux-gcp-fips5.4.0-1021.21+fips1, 0
Ubuntu:22.04:LTSlinux-riscv-5.195.19.0-1021.23~22.04.1, 0, 5.19.0-1012.13~22.04.1
Ubuntu:22.04:LTSlinux-hwe-5.195.19.0-28.29~22.04.1, 5.19.0-45.46~22.04.1, 5.19.0-43.44~22.04.1
Ubuntu:20.04:LTSlinux-raspi25.4.0-1004.4, 5.4.0-1006.6, 0
Ubuntu:22.04:LTSlinux-azure-5.195.19.0-1021.22~22.04.1, 0, 5.19.0-1023.24~22.04.1
Ubuntu:22.04:LTSlinux-oem-5.175.17.0-1018.19, 5.17.0-1017.18, 5.17.0-1016.17
Ubuntu:18.04:LTSlinux-gke-5.45.4.0-1074.79~18.04.1, 5.4.0-1027.28~18.04.1, 5.4.0-1029.31~18.04.1
Ubuntu:Pro:FIPS:18.04:LTSlinux-gcp-fips0, 4.15.0-1001.1
Ubuntu:Pro:FIPS-updates:18.04:LTSlinux-aws-fips4.15.0-2021.21, 4.15.0-2018.18, 4.15.0-2000.4
Ubuntu:20.04:LTSlinux-azure5.4.0-1132.139, 0, 5.3.0-1003.3
Ubuntu:Pro:18.04:LTSlinux-ibm-5.45.4.0-1028.32~18.04.1, 0, 5.4.0-1010.11~18.04.2

…and 104 more

Timeline

  • Jun 20, 2024 CVE Published
  • Oct 28, 2026 CVE Updated
  • Oct 30, 2026 Distribution Patch (11 in total, the first dated here)
  • Oct 30, 2026 Security Advisory (11 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln UBUNTU-CVE-2022-48733
vulnetix vdb fixes UBUNTU-CVE-2022-48733

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/UBUNTU-CVE-2022-48733/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›