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

CVE record · `CVE-2022-50285`

- **Identifiers:** `CVE-2022-50285`
- **State:** Confirmed
- **Severity:** No CVSS score
- **Critical:** No
- **CNA:** Linux
- **Technologies:** [Linux kernel](https://agentprime.io/advisories/technology/linux-kernel.md)
- **Published:** 15 Sept 2025
- **Updated:** 5 Nov 2026
- **Reviewed by a person:** No

Published by the CVE Program (CNA: Linux) at 15 Sept 2025, 14:21 UTC. agentprime has not analysed this yet, so whether it affects any app is not known. This CVE names a vendor and product rather than a package, so the lockfile check doesn’t match it.

## Affected products, as the CNA wrote them

- Vendor: Linux. Product: Linux.
  - affected: `a88c769548047b21f76fd71e04b6a3300ff17160 to before 3e50a07b6a5fcd39df1534d3fdaca4292a65efe6` (git)
  - affected: `a88c769548047b21f76fd71e04b6a3300ff17160 to before 629c986e19fe9481227c7cdfd9a105bbc104d245` (git)
  - affected: `a88c769548047b21f76fd71e04b6a3300ff17160 to before 2b35432d324898ec41beb27031d2a1a864a4d40e` (git)
  - affected: `a88c769548047b21f76fd71e04b6a3300ff17160 to before 11993652d0b49e27272db0a37aa828d8a3a4b92b` (git)
  - affected: `a88c769548047b21f76fd71e04b6a3300ff17160 to before 568e3812b1778b4c0c229649b59977d88f400ece` (git)
  - affected: `a88c769548047b21f76fd71e04b6a3300ff17160 to before 112a005d1ded04a4b41b6d01833cc0bda90625cc` (git)
  - affected: `a88c769548047b21f76fd71e04b6a3300ff17160 to before c828fab903725279aa9dc6ae3d44bb7e4778f92c` (git)
  - affected: `a88c769548047b21f76fd71e04b6a3300ff17160 to before 12df140f0bdfae5dcfc81800970dd7f6f632e00c` (git)
  - affected: `3f5fae4d1a3189d95b02b4b45e1218df147122bc` (git)
  - affected: `4.3.6 to before 4.4` (semver)
  - Other versions: unaffected
- Vendor: Linux. Product: Linux.
  - affected: `4.4`
  - unaffected: `before 4.4` (semver)
  - unaffected: `4.9.332 to 4.9.*, inclusive` (semver)
  - unaffected: `4.14.298 to 4.14.*, inclusive` (semver)
  - unaffected: `4.19.264 to 4.19.*, inclusive` (semver)
  - unaffected: `5.4.223 to 5.4.*, inclusive` (semver)
  - unaffected: `5.10.153 to 5.10.*, inclusive` (semver)
  - unaffected: `5.15.76 to 5.15.*, inclusive` (semver)
  - unaffected: `6.0.6 to 6.0.*, inclusive` (semver)
  - unaffected: `6.1 to *, inclusive` (original_commit_for_fix)
  - Other versions: affected

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> Linux from 4.4 is affected by a race in its hugetlb memory code, where the h->resv_huge_pages counter can be decremented outside its lock and become corrupted. The source gives few details on what an attacker needs or what else they can do. Upgrade to 4.9.332, 4.14.298, 4.19.264, 5.4.223, or a later release in those series. No workaround is listed.

Written 16 Nov 2026.

## Not analysed yet

We haven’t published our own analysis of this CVE. If a person reviews it, this page will say what’s affected and what has to be true for it to matter.

## Severity and exploitation

No source has published a CVSS score for this record yet.

- **CISA KEV:** Not listed.
- **EPSS:** 0.0017, the 5th percentile, on 20 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 15 Sept 2025, 14:21 UTC: [Confirmed by the CVE List](https://www.cve.org/CVERecord?id=CVE-2022-50285)
- 15 Sept 2025, 15:15 UTC: [Confirmed by NVD](https://nvd.nist.gov/vuln/detail/CVE-2022-50285)

## Sources

- [CVE List: CVE-2022-50285](https://www.cve.org/CVERecord?id=CVE-2022-50285)
- [NVD: CVE-2022-50285](https://nvd.nist.gov/vuln/detail/CVE-2022-50285)

### References from the CNA

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

Facts on this page come from the CVE List as the CNA published them, with CVSS from the sources named above, CISA KEV and FIRST EPSS. Vendors, products and versions are shown as the CNA wrote them. We don’t reproduce the CVE’s description.

## Check whether this affects you

This CVE names a vendor and product rather than a package, so the lockfile check doesn’t match it. Compare the affected versions above with what you run.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), `get_advisory` returns this record and `search_advisories` finds related ones. Setup: <https://agentprime.io/mcp.md>
- As JSON: <https://api.agentprime.io/v1/advisories/CVE-2022-50285>
- Everything that needs attention now: <https://agentprime.io/advisories/critical.md>

---

The web page: <https://agentprime.io/advisories/CVE-2022-50285/>. Everything for agents: <https://agentprime.io/llms.txt>.
