[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2025091558-CVE-2022-50300-203c@gregkh>
Date: Mon, 15 Sep 2025 16:46:02 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-cve-announce@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...nel.org>
Subject: CVE-2022-50300: btrfs: fix extent map use-after-free when handling missing device in read_one_chunk
From: Greg Kroah-Hartman <gregkh@...nel.org>
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
The Linux kernel CVE team has assigned CVE-2022-50300 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.15 with commit adfb69af7d8cb6a3958f75aad1ef4bc96891d116 and fixed in 5.15.87 with commit b8e7ed42bc3ca0d0e4191ee394d34962d3624c22
Issue introduced in 4.15 with commit adfb69af7d8cb6a3958f75aad1ef4bc96891d116 and fixed in 6.0.18 with commit fce3713197ebba239e1c7e02174ed216ea1ee014
Issue introduced in 4.15 with commit adfb69af7d8cb6a3958f75aad1ef4bc96891d116 and fixed in 6.1.4 with commit 169a4cf46882974d4db6d85eb623ec898e51bbc0
Issue introduced in 4.15 with commit adfb69af7d8cb6a3958f75aad1ef4bc96891d116 and fixed in 6.2 with commit 1742e1c90c3da344f3bb9b1f1309b3f47482756a
Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to
older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2022-50300
will be updated if fixes are backported, please check that for the most
up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
fs/btrfs/volumes.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes. Individual
changes are never tested alone, but rather are part of a larger kernel
release. Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all. If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
https://git.kernel.org/stable/c/b8e7ed42bc3ca0d0e4191ee394d34962d3624c22
https://git.kernel.org/stable/c/fce3713197ebba239e1c7e02174ed216ea1ee014
https://git.kernel.org/stable/c/169a4cf46882974d4db6d85eb623ec898e51bbc0
https://git.kernel.org/stable/c/1742e1c90c3da344f3bb9b1f1309b3f47482756a
Powered by blists - more mailing lists