Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2022-49167

published high CVSS 3.1 · 7.8

btrfs: do not double complete bio on errors during compressed reads

Published
26 Feb 2025, 01:55:26 UTC
Updated
05 Aug 2026, 08:54:11 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Linux — Linux86ccbb4d2a2af4109430df518c995a4f7d14dfd2 to < 4a4ceb2b990771c374d85d496a1a45255dde48e3 · 86ccbb4d2a2af4109430df518c995a4f7d14dfd2 to < 987b5df1d10355d377315a26e7fb6c72ded83c9f · 86ccbb4d2a2af4109430df518c995a4f7d14dfd2 to < f9f15de85d74e7eef021af059ca53a15f041cdd8 · Other versions: unaffected Affected Not stated Linux
Linux — Linux5.16 (affected) · 0 to < 5.16 (unaffected · semver) · 5.16.19 through 5.16.* (unaffected · semver) · 5.17.2 through 5.17.* (unaffected · semver) · 5.18 and later (unaffected · original_commit_for_fix) · Other versions: affected Version-specific Not stated Linux
Amazon Linux AL2 Release evaluation Not Affected Not required Amazon Linux assessment
Amazon Linux AL2023 Release evaluation Not Affected Not required Amazon Linux assessment

Description

In the Linux kernel, the following vulnerability has been resolved: btrfs: do not double complete bio on errors during compressed reads I hit some weird panics while fixing up the error handling from btrfs_lookup_bio_sums(). Turns out the compression path will complete the bio we use if we set up any of the compression bios and then return an error, and then btrfs_submit_data_bio() will also call bio_endio() on the bio. Fix this by making btrfs_submit_compressed_read() responsible for calling bio_endio() on the bio if there are any errors. Currently it was only doing it if we created the compression bios, otherwise it was depending on btrfs_submit_data_bio() to do the right thing. This creates the above problem, so fix up btrfs_submit_compressed_read() to always call bio_endio() in case of an error, and then simply return from btrfs_submit_data_bio() if we had to call btrfs_submit_compressed_read().

en · Linux · cna

Vendor advisories explicitly linked to this CVE.

0

No linked advisories were found for this CVE.

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
3.1
Base score
7.8 / 10
Severity
high
Provider
Linux · cna
Vector string
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Scenarios
en: AV:L - The bug is in btrfs compressed buffered-read submission (read → extent_io → submit_one_bio → btrfs_submit_data_bio → btrfs_submit_compressed_read), reachable only via local VFS reads of compressed extents on a mounted btrfs filesystem, not via network protocol handlers. AC:L - An attacker who can read compressed files can drive the finish_cb error path (e.g., by inducing ENOMEM in btrfs_lookup_bio_sums/alloc_compressed_bio after pages are allocated); no victim-controlled race or rare non-default config is required. PR:L - An unprivileged local user can create compressed files (mount compress= or chattr +c) and read them on an already-mounted btrfs volume; no real root or init-namespace admin capability is required. UI:N - Exploitation needs no separate victim action once btrfs is mounted; the attacker triggers the path by reading their own compressed files (and optionally stressing memory). S:U - Impact stays within the local kernel/OS security authority (standard kernel memory corruption / DoS); there is no VM escape, IOMMU bypass, or other cross-boundary effect. C:H - Double bio_endio after end_bio_extent_readpage's bio_put is a use-after-free of the bio (bioset object), which per UAF guidance enables reclaim and arbitrary read primitives. I:H - The same bio UAF/double-free, plus re-entry into page unlock/extent-release paths on already-completed state, is memory corruption that can be leveraged for write primitives and control-flow hijacking. A:H - The author observed kernel panics from the double completion; UAF/double bio_put and double page unlock reliably cause oops/panic or equivalent denial of service.

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
Linux Linux 86ccbb4d2a2af4109430df518c995a4f7d14dfd2 to < 4a4ceb2b990771c374d85d496a1a45255dde48e3 (affected · git)86ccbb4d2a2af4109430df518c995a4f7d14dfd2 to < 987b5df1d10355d377315a26e7fb6c72ded83c9f (affected · git)86ccbb4d2a2af4109430df518c995a4f7d14dfd2 to < f9f15de85d74e7eef021af059ca53a15f041cdd8 (affected · git)Default: unaffected Linux · cna
Linux Linux 5.16 (affected)0 to < 5.16 (unaffected · semver)5.16.19 through 5.16.* (unaffected · semver)5.17.2 through 5.17.* (unaffected · semver)5.18 and later (unaffected · original_commit_for_fix)Default: affected Linux · cna

Weaknesses

0

No weakness assertions.

References

3

Provider assertions

1

Linux · cna

btrfs: do not double complete bio on errors during compressed reads

Provenance

Schema
5.2
Searchable
yes
Content hash
031f8ae1defef5a7ff762f4e6fb4e431822ef630dae1d578650daa666b1cdc84
Ingested
23 Sep 2026, 08:04:03 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected