Bug 2347737 (CVE-2022-49168) - CVE-2022-49168 kernel: btrfs: do not clean up repair bio if submit fails
Summary: CVE-2022-49168 kernel: btrfs: do not clean up repair bio if submit fails
Keywords:
Status: NEW
Alias: CVE-2022-49168
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-02-26 03:04 UTC by OSIDB Bzimport
Modified: 2025-02-26 21:06 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-02-26 03:04:58 UTC
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.

Comment 1 Avinash Hanwate 2025-02-26 21:02:45 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025022612-CVE-2022-49168-d59d@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.