[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2025091507-CVE-2022-50285-955c@gregkh>
Date: Mon, 15 Sep 2025 16:21:27 +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-50285: mm,hugetlb: take hugetlb_lock before decrementing h->resv_huge_pages
From: Greg Kroah-Hartman <gregkh@...nel.org>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
mm,hugetlb: take hugetlb_lock before decrementing h->resv_huge_pages
The h->*_huge_pages counters are protected by the hugetlb_lock, but
alloc_huge_page has a corner case where it can decrement the counter
outside of the lock.
This could lead to a corrupted value of h->resv_huge_pages, which we have
observed on our systems.
Take the hugetlb_lock before decrementing h->resv_huge_pages to avoid a
potential race.
The Linux kernel CVE team has assigned CVE-2022-50285 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.4 with commit a88c769548047b21f76fd71e04b6a3300ff17160 and fixed in 4.9.332 with commit 3e50a07b6a5fcd39df1534d3fdaca4292a65efe6
Issue introduced in 4.4 with commit a88c769548047b21f76fd71e04b6a3300ff17160 and fixed in 4.14.298 with commit 629c986e19fe9481227c7cdfd9a105bbc104d245
Issue introduced in 4.4 with commit a88c769548047b21f76fd71e04b6a3300ff17160 and fixed in 4.19.264 with commit 2b35432d324898ec41beb27031d2a1a864a4d40e
Issue introduced in 4.4 with commit a88c769548047b21f76fd71e04b6a3300ff17160 and fixed in 5.4.223 with commit 11993652d0b49e27272db0a37aa828d8a3a4b92b
Issue introduced in 4.4 with commit a88c769548047b21f76fd71e04b6a3300ff17160 and fixed in 5.10.153 with commit 568e3812b1778b4c0c229649b59977d88f400ece
Issue introduced in 4.4 with commit a88c769548047b21f76fd71e04b6a3300ff17160 and fixed in 5.15.76 with commit 112a005d1ded04a4b41b6d01833cc0bda90625cc
Issue introduced in 4.4 with commit a88c769548047b21f76fd71e04b6a3300ff17160 and fixed in 6.0.6 with commit c828fab903725279aa9dc6ae3d44bb7e4778f92c
Issue introduced in 4.4 with commit a88c769548047b21f76fd71e04b6a3300ff17160 and fixed in 6.1 with commit 12df140f0bdfae5dcfc81800970dd7f6f632e00c
Issue introduced in 4.3.6 with commit 3f5fae4d1a3189d95b02b4b45e1218df147122bc
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-50285
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:
mm/hugetlb.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/3e50a07b6a5fcd39df1534d3fdaca4292a65efe6
https://git.kernel.org/stable/c/629c986e19fe9481227c7cdfd9a105bbc104d245
https://git.kernel.org/stable/c/2b35432d324898ec41beb27031d2a1a864a4d40e
https://git.kernel.org/stable/c/11993652d0b49e27272db0a37aa828d8a3a4b92b
https://git.kernel.org/stable/c/568e3812b1778b4c0c229649b59977d88f400ece
https://git.kernel.org/stable/c/112a005d1ded04a4b41b6d01833cc0bda90625cc
https://git.kernel.org/stable/c/c828fab903725279aa9dc6ae3d44bb7e4778f92c
https://git.kernel.org/stable/c/12df140f0bdfae5dcfc81800970dd7f6f632e00c
Powered by blists - more mailing lists