# CVE-2022-50285: mm,hugetlb: take hugetlb_lock before decrementing h->resv_huge_pages

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.17%, higher than 6% of CVEs (2026-12-02)
- Published: 2025-09-15T14:21:21.504Z
- Modified: 2026-11-05T20:17:32.560Z
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from a88c769548047b21f76fd71e04b6a3300ff17160 before 3e50a07b6a5fcd39df1534d3fdaca4292a65efe6; from a88c769548047b21f76fd71e04b6a3300ff17160 before 629c986e19fe9481227c7cdfd9a105bbc104d245; from a88c769548047b21f76fd71e04b6a3300ff17160 before 2b35432d324898ec41beb27031d2a1a864a4d40e; from a88c769548047b21f76fd71e04b6a3300ff17160 before 11993652d0b49e27272db0a37aa828d8a3a4b92b; from a88c769548047b21f76fd71e04b6a3300ff17160 before 568e3812b1778b4c0c229649b59977d88f400ece; from a88c769548047b21f76fd71e04b6a3300ff17160 before 112a005d1ded04a4b41b6d01833cc0bda90625cc; from a88c769548047b21f76fd71e04b6a3300ff17160 before c828fab903725279aa9dc6ae3d44bb7e4778f92c; from a88c769548047b21f76fd71e04b6a3300ff17160 before 12df140f0bdfae5dcfc81800970dd7f6f632e00c; 3f5fae4d1a3189d95b02b4b45e1218df147122bc; from 4.3.6 before 4.4; 4.4 (not affected: before 4.4; from 4.9.332 up to 4.9.*; from 4.14.298 up to 4.14.*; from 4.19.264 up to 4.19.*; from 5.4.223 up to 5.4.*; from 5.10.153 up to 5.10.*; from 5.15.76 up to 5.15.*; from 6.0.6 up to 6.0.*; from 6.1 up to *)
- linux linux_kernel: from 4.3.6 before 4.4; from 4.4.1 before 4.9.332; from 4.10 before 4.14.298; from 4.15 before 4.19.264; from 4.20 before 5.4.223; from 5.5 before 5.10.153; from 5.11 before 5.15.76; from 5.16 before 6.0.6; 4.4; 6.1

## References

- <https://git.kernel.org/stable/c/3e50a07b6a5fcd39df1534d3fdaca4292a65efe6> (patch)
- <https://git.kernel.org/stable/c/629c986e19fe9481227c7cdfd9a105bbc104d245> (patch)
- <https://git.kernel.org/stable/c/2b35432d324898ec41beb27031d2a1a864a4d40e> (patch)
- <https://git.kernel.org/stable/c/11993652d0b49e27272db0a37aa828d8a3a4b92b> (patch)
- <https://git.kernel.org/stable/c/568e3812b1778b4c0c229649b59977d88f400ece> (patch)
- <https://git.kernel.org/stable/c/112a005d1ded04a4b41b6d01833cc0bda90625cc> (patch)
- <https://git.kernel.org/stable/c/c828fab903725279aa9dc6ae3d44bb7e4778f92c> (patch)
- <https://git.kernel.org/stable/c/12df140f0bdfae5dcfc81800970dd7f6f632e00c> (patch)

## Sources

- CVE List: [CVE-2022-50285](https://www.cve.org/CVERecord?id=CVE-2022-50285), CVE Terms of Use, modified 2026-11-05
- NVD: [CVE-2022-50285](https://nvd.nist.gov/vuln/detail/CVE-2022-50285), Public domain, modified 2026-11-05

---

Page: https://cve.day/CVE-2022-50285 · Whole record: https://cve.day/CVE-2022-50285.json · Rebuilt by cve.day 2026-11-25T22:58:21.148Z
