CVE-2022-50293

Source
https://cve.org/CVERecord?id=CVE-2022-50293
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50293.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-50293
Downstream
Related
Published
2025-09-15T14:45:49.338Z
Modified
2026-04-02T08:28:23.396350Z
Summary
btrfs: do not BUG_ON() on ENOMEM when dropping extent items for a range
Details

In the Linux kernel, the following vulnerability has been resolved:

btrfs: do not BUG_ON() on ENOMEM when dropping extent items for a range

If we get -ENOMEM while dropping file extent items in a given range, at btrfsdropextents(), due to failure to allocate memory when attempting to increment the reference count for an extent or drop the reference count, we handle it with a BUGON(). This is excessive, instead we can simply abort the transaction and return the error to the caller. In fact most callers of btrfsdropextents(), directly or indirectly, already abort the transaction if btrfsdrop_extents() returns any error.

Also, we already have error paths at btrfsdropextents() that may return -ENOMEM and in those cases we abort the transaction, like for example anything that changes the b+tree may return -ENOMEM due to a failure to allocate a new extent buffer when COWing an existing extent buffer, such as a call to btrfsduplicateitem() for example.

So replace the BUG_ON() calls with proper logic to abort the transaction and return the error.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50293.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
39279cc3d2704cfbf9c35dcb5bdd392159ae4625
Fixed
50f993da945074b2a069da099a0331b23a0c89a0
Fixed
7fbcb635c8fc927d139f3302babcf1b42c09265c
Fixed
1baf3370e2dc5e6bd1368348736189457dab2a27
Fixed
162d053e15fe985f754ef495a96eb3db970c43ed

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50293.json"