CVE-2022-49168

btrfs: do not clean up repair bio if submit fails

State
Published
Severity
7.8 High
Published
Feb 26, 2025
Updated
Aug 5, 2026
Reserved
Feb 26, 2025

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.17.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HLinux
3.17.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HCISA-ADP

Weaknesses

Affected Products

ProductVersions
LinuxLinux
  • 6c387ab20db15f2bd448f7c508e2638101b16ea1 to before e7e1d15d2bd8c373cf621614ddd17971a2132713Affected
  • 6c387ab20db15f2bd448f7c508e2638101b16ea1 to before 7170875083254b51fcc5d67f96640977083f481eAffected
  • 6c387ab20db15f2bd448f7c508e2638101b16ea1 to before e76c78c48902dae6fa612749f59162bca0a79e0bAffected
  • 6c387ab20db15f2bd448f7c508e2638101b16ea1 to before d1cb11fb45ebbb1e7dfe5e9038b32ea72c184b14Affected
  • 6c387ab20db15f2bd448f7c508e2638101b16ea1 to before 8cbc3001a3264d998d6b6db3e23f935c158abd4dAffected
LinuxLinux
  • 3.18Affected
  • before 3.18Not affected
  • 5.10.248 through 5.10.*Not affected
  • 5.15.184 through 5.15.*Not affected
  • 5.16.19 through 5.16.*Not affected
  • 5.17.2 through 5.17.*Not affected
  • 5.18 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.