{"id":"CVE-2022-49167","summary":"btrfs: do not double complete bio on errors during compressed reads","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nbtrfs: do not double complete bio on errors during compressed reads\n\nI hit some weird panics while fixing up the error handling from\nbtrfs_lookup_bio_sums().  Turns out the compression path will complete\nthe bio we use if we set up any of the compression bios and then return\nan error, and then btrfs_submit_data_bio() will also call bio_endio() on\nthe bio.\n\nFix this by making btrfs_submit_compressed_read() responsible for\ncalling bio_endio() on the bio if there are any errors.  Currently it\nwas only doing it if we created the compression bios, otherwise it was\ndepending on btrfs_submit_data_bio() to do the right thing.  This\ncreates the above problem, so fix up btrfs_submit_compressed_read() to\nalways call bio_endio() in case of an error, and then simply return from\nbtrfs_submit_data_bio() if we had to call\nbtrfs_submit_compressed_read().","modified":"2026-04-02T08:27:21.746637Z","published":"2025-02-26T01:55:26.030Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49167.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/4a4ceb2b990771c374d85d496a1a45255dde48e3"},{"type":"WEB","url":"https://git.kernel.org/stable/c/987b5df1d10355d377315a26e7fb6c72ded83c9f"},{"type":"WEB","url":"https://git.kernel.org/stable/c/f9f15de85d74e7eef021af059ca53a15f041cdd8"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49167.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-49167"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"86ccbb4d2a2af4109430df518c995a4f7d14dfd2"},{"fixed":"4a4ceb2b990771c374d85d496a1a45255dde48e3"},{"fixed":"987b5df1d10355d377315a26e7fb6c72ded83c9f"},{"fixed":"f9f15de85d74e7eef021af059ca53a15f041cdd8"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49167.json"}}],"schema_version":"1.7.5"}