CVE-2022-50293

Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
15/09/2025
Last modified:
15/09/2025

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> btrfs: do not BUG_ON() on ENOMEM when dropping extent items for a range<br /> <br /> If we get -ENOMEM while dropping file extent items in a given range, at<br /> btrfs_drop_extents(), due to failure to allocate memory when attempting to<br /> increment the reference count for an extent or drop the reference count,<br /> we handle it with a BUG_ON(). This is excessive, instead we can simply<br /> abort the transaction and return the error to the caller. In fact most<br /> callers of btrfs_drop_extents(), directly or indirectly, already abort<br /> the transaction if btrfs_drop_extents() returns any error.<br /> <br /> Also, we already have error paths at btrfs_drop_extents() that may return<br /> -ENOMEM and in those cases we abort the transaction, like for example<br /> anything that changes the b+tree may return -ENOMEM due to a failure to<br /> allocate a new extent buffer when COWing an existing extent buffer, such<br /> as a call to btrfs_duplicate_item() for example.<br /> <br /> So replace the BUG_ON() calls with proper logic to abort the transaction<br /> and return the error.

Impact