CVE-2022-49168
kernel: btrfs: do not clean up repair bio if submit fails
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · February 26, 2025
Updated · October 30, 2026
Description
In the Linux kernel, the following vulnerability has been resolved:
btrfs: do not clean up repair bio if submit fails
The submit helper will always run bio_endio() on the bio if it fails to submit, so cleaning up the bio just leads to a variety of use-after-free and NULL pointer dereference bugs because we race with the endio function that is cleaning up the bio. Instead just return BLK_STS_OK as the repair function has to continue to process the rest of the pages, and the endio for the repair bio will do the appropriate cleanup for the page that it was given.
Statement
This vulnerability is rated as having a Moderate impact for Red Hat products because exploitation requires a local user to interact with an active Btrfs file system, and triggering the race condition depends on specific I/O submission failures. Btrfs is not enabled by default and has been removed from modern releases such as Red Hat Enterprise Linux 8 and 9. Consequently, exposure is limited to environments where Btrfs file systems are explicitly mounted and used.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
No mitigation is specified in collected source.
CVSS / CWE
CVSS 3.1 · 6.5CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:L/A:H
CWE-416 · Use After Free