CVE-2022-50300

btrfs: fix extent map use-after-free when handling missing device in read_one_chunk

HIGH
7.8
CVSS Score
Published: September 15, 2025 at 02:45 PM UTC
Updated: August 5, 2026 at 09:24 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.8
Exploit prediction
EPSS 0.2%

Description

In the Linux kernel, the following vulnerability has been resolved: btrfs: fix extent map use-after-free when handling missing device in read_one_chunk Store the error code before freeing the extent_map. Though it's reference counted structure, in that function it's the first and last allocation so this would lead to a potential use-after-free. The error can happen eg. when chunk is stored on a missing device and the degraded mount option is missing. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=216721

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

4.15 ≤ v < 5.15.874.15 ≤ v < 6.0.184.15 ≤ v < 6.1.44.15 ≤ v < 6.25.16 ≤ v < 6.0.186.1 ≤ v < 6.1.44.15adfb69af7d8cb6a3958f75aad1ef4bc96891d116
Vendor states this is fixed in 169a4cf46882974d4db6d85eb623ec898e51bbc0 (fixed)
Vendor states this is fixed in 1742e1c90c3da344f3bb9b1f1309b3f47482756a (fixed)
Vendor states this is fixed in b8e7ed42bc3ca0d0e4191ee394d34962d3624c22 (fixed)
Vendor states this is fixed in fce3713197ebba239e1c7e02174ed216ea1ee014 (fixed)
Vendor states this is fixed in 4.15 (unaffected)
Vendor states this is fixed in 5.15.87 (unaffected)
Vendor states this is fixed in 6.0.18 (unaffected)
Vendor states this is fixed in 6.1.4 (unaffected)
Vendor states this is fixed in 6.2 (unaffected)

References (4)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/169a4cf46882974d4db6d85eb623ec898e51bbc0
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/1742e1c90c3da344f3bb9b1f1309b3f47482756a
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/b8e7ed42bc3ca0d0e4191ee394d34962d3624c22
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/fce3713197ebba239e1c7e02174ed216ea1ee014

CVSS

7.8HIGHLinux
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-416

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card