UBUNTU-CVE-2022-48733
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.
| Package | Ecosystem | Fixed in |
|---|---|---|
| linux-aws-fips | Ubuntu:Pro:FIPS-updates:20.04:LTS | 5.4.0-1136.146+fips1 |
| linux-azure | Ubuntu:Pro:16.04:LTS | 4.15.0-1183.198~16.04.1 |
| linux-aws-fips | Ubuntu:Pro:FIPS-updates:18.04:LTS | 4.15.0-2113.119 |
| linux-azure | Ubuntu:20.04:LTS | 5.4.0-1142.149 |
| linux-ibm-5.4 | Ubuntu:Pro:18.04:LTS | 5.4.0-1083.88~18.04.1 |
| linux-azure-fips | Ubuntu:Pro:FIPS-updates:18.04:LTS | 4.15.0-2092.98 |
| linux-aws-hwe | Ubuntu:Pro:16.04:LTS | 4.15.0-1175.188~16.04.1 |
| linux-raspi-5.4 | Ubuntu:Pro:18.04:LTS | 5.4.0-1120.132~18.04.1 |
| linux-gcp | Ubuntu:Pro:16.04:LTS | 4.15.0-1168.185~16.04.1 |
| linux-gcp-4.15 | Ubuntu:Pro:18.04:LTS | 4.15.0-1168.185 |
| linux-oracle | Ubuntu:20.04:LTS | 5.4.0-1135.144 |
| linux-hwe | Ubuntu:Pro:16.04:LTS | 4.15.0-231.243~16.04.1 |
24 more packages have a fixed version. See every fix in Lookup.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Ubuntu:22.04:LTS | linux-oem-6.0 | 6.0.0-1021.21, 0, 6.0.0-1006.6 |
| Ubuntu:20.04:LTS | linux-gkeop | 5.4.0-1091.95, 0, 5.4.0-1008.9 |
| Ubuntu:Pro:FIPS:18.04:LTS | linux-azure-fips | 4.15.0-1002.2, 0 |
| Ubuntu:20.04:LTS | linux-riscv-5.8 | 5.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:LTS | linux-nvidia-6.2 | 0, 6.2.0-1015.15, 6.2.0-1013.13 |
| Ubuntu:18.04:LTS | linux-azure | 5.0.0-1035.37, 5.0.0-1036.38, 4.18.0-1011.11~18.04.1 |
| Ubuntu:Pro:FIPS-updates:20.04:LTS | linux-aws-fips | 5.4.0-1088.96+fips1, 5.4.0-1086.93+fips1, 5.4.0-1085.92+fips1 |
| Ubuntu:20.04:LTS | linux-gke | 5.4.0-1067.70, 0, 5.4.0-1033.35 |
| Ubuntu:Pro:16.04:LTS | linux-azure | 4.15.0-1165.180~16.04.1, 4.11.0-1015.15, 4.11.0-1016.16 |
| Ubuntu:Pro:FIPS:20.04:LTS | linux-gcp-fips | 5.4.0-1021.21+fips1, 0 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | 5.19.0-1021.23~22.04.1, 0, 5.19.0-1012.13~22.04.1 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | 5.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:LTS | linux-raspi2 | 5.4.0-1004.4, 5.4.0-1006.6, 0 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | 5.19.0-1021.22~22.04.1, 0, 5.19.0-1023.24~22.04.1 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | 5.17.0-1018.19, 5.17.0-1017.18, 5.17.0-1016.17 |
| Ubuntu:18.04:LTS | linux-gke-5.4 | 5.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:LTS | linux-gcp-fips | 0, 4.15.0-1001.1 |
| Ubuntu:Pro:FIPS-updates:18.04:LTS | linux-aws-fips | 4.15.0-2021.21, 4.15.0-2018.18, 4.15.0-2000.4 |
| Ubuntu:20.04:LTS | linux-azure | 5.4.0-1132.139, 0, 5.3.0-1003.3 |
| Ubuntu:Pro:18.04:LTS | linux-ibm-5.4 | 5.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
References
- https://ubuntu.com/security/CVE-2022-48733 report
- https://www.cve.org/CVERecord?id=CVE-2022-48733 report
- https://git.kernel.org/linus/28b21c558a3753171097193b6f6602a94169093a report
- https://git.kernel.org/stable/c/a7b717fa15165d3d9245614680bebc48a52ac05d report
- https://git.kernel.org/stable/c/9372fa1d73da5f1673921e365d0cd2c27ec7adc2 report
- https://git.kernel.org/stable/c/28b21c558a3753171097193b6f6602a94169093a report
- https://ubuntu.com/security/notices/USN-7121-1 advisory
- https://ubuntu.com/security/notices/USN-7121-2 advisory
- https://ubuntu.com/security/notices/USN-7121-3 advisory
- https://ubuntu.com/security/notices/USN-7148-1 advisory
- https://ubuntu.com/security/notices/USN-7159-1 advisory
- https://ubuntu.com/security/notices/USN-7159-2 advisory
- https://ubuntu.com/security/notices/USN-7159-3 advisory
- https://ubuntu.com/security/notices/USN-7159-4 advisory
- https://ubuntu.com/security/notices/USN-7159-5 advisory
- https://ubuntu.com/security/notices/USN-7195-1 advisory
- https://ubuntu.com/security/notices/USN-7195-2 advisory