CVE-2022-49167
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
26/02/2025
Last modified:
26/02/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
btrfs: do not double complete bio on errors during compressed reads<br />
<br />
I hit some weird panics while fixing up the error handling from<br />
btrfs_lookup_bio_sums(). Turns out the compression path will complete<br />
the bio we use if we set up any of the compression bios and then return<br />
an error, and then btrfs_submit_data_bio() will also call bio_endio() on<br />
the bio.<br />
<br />
Fix this by making btrfs_submit_compressed_read() responsible for<br />
calling bio_endio() on the bio if there are any errors. Currently it<br />
was only doing it if we created the compression bios, otherwise it was<br />
depending on btrfs_submit_data_bio() to do the right thing. This<br />
creates the above problem, so fix up btrfs_submit_compressed_read() to<br />
always call bio_endio() in case of an error, and then simply return from<br />
btrfs_submit_data_bio() if we had to call<br />
btrfs_submit_compressed_read().