CVE-2022-50300

Source
https://cve.org/CVERecord?id=CVE-2022-50300
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50300.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-50300
Downstream
Published
2025-09-15T14:45:55.896Z
Modified
2026-03-12T03:26:22.611163Z
Summary
btrfs: fix extent map use-after-free when handling missing device in read_one_chunk
Details

In the Linux kernel, the following vulnerability has been resolved:

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

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

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50300.json"
}
References

Affected packages

Git / 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
adfb69af7d8cb6a3958f75aad1ef4bc96891d116
Fixed
b8e7ed42bc3ca0d0e4191ee394d34962d3624c22
Fixed
fce3713197ebba239e1c7e02174ed216ea1ee014
Fixed
169a4cf46882974d4db6d85eb623ec898e51bbc0
Fixed
1742e1c90c3da344f3bb9b1f1309b3f47482756a

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50300.json"