PT-2022-7659 · Linux+5 · Linux Kernel+5
Filipe Manana
·
Published
2022-01-31
·
Updated
2025-05-27
·
CVE-2022-48733
CVSS v3.1
7.8
High
| Vector | AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Name of the Vulnerable Software and Affected Versions
Linux kernel (affected versions not specified)
Description
The issue is related to a use-after-free vulnerability in the Linux kernel's btrfs file system. Specifically, it occurs when creating a snapshot and the
btrfs commit transaction() function fails, leading to a situation where a pending snapshot structure is freed but still accessible, resulting in a user-after-free scenario. This can happen in the following sequence:- A pending snapshot is allocated and added to the transaction's list of pending snapshots.
btrfs commit transaction()is called, and if it fails, the pending snapshot structure is freed.- Another task commits the transaction without errors, accessing the already freed pending snapshot structure, thus causing a user-after-free.
The vulnerability could be detected by smatch, which produced a warning about the pending snapshot not being removed from the list. To fix this, the snapshot creation ioctl should not directly add the pending snapshot to the transaction's list. Instead, it should add the pending snapshot to the transaction handle, and then at
btrfs commit transaction(), add the snapshot to the list only when it can be guaranteed that any error returned after that point will result in a transaction abort.Recommendations
At the moment, there is no information about a newer version that contains a fix for this vulnerability.
Exploit
Use After Free
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Astra Linux
Linuxmint
Linux Kernel
Red Os
Suse
Ubuntu