CVE-2022-50285

Source
https://cve.org/CVERecord?id=CVE-2022-50285
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50285.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-50285
Downstream
Related
Published
2025-09-15T14:21:21.504Z
Modified
2026-03-20T11:47:22.185488Z
Summary
mm,hugetlb: take hugetlb_lock before decrementing h->resv_huge_pages
Details

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

mm,hugetlb: take hugetlblock before decrementing h->resvhuge_pages

The h->*hugepages counters are protected by the hugetlblock, but allochuge_page has a corner case where it can decrement the counter outside of the lock.

This could lead to a corrupted value of h->resvhugepages, which we have observed on our systems.

Take the hugetlblock before decrementing h->resvhuge_pages to avoid a potential race.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50285.json",
    "cna_assigner": "Linux"
}
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
a88c769548047b21f76fd71e04b6a3300ff17160
Fixed
3e50a07b6a5fcd39df1534d3fdaca4292a65efe6
Fixed
629c986e19fe9481227c7cdfd9a105bbc104d245
Fixed
2b35432d324898ec41beb27031d2a1a864a4d40e
Fixed
11993652d0b49e27272db0a37aa828d8a3a4b92b
Fixed
568e3812b1778b4c0c229649b59977d88f400ece
Fixed
112a005d1ded04a4b41b6d01833cc0bda90625cc
Fixed
c828fab903725279aa9dc6ae3d44bb7e4778f92c
Fixed
12df140f0bdfae5dcfc81800970dd7f6f632e00c
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
3f5fae4d1a3189d95b02b4b45e1218df147122bc

Database specific

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