{"id":"CVE-2022-50285","summary":"mm,hugetlb: take hugetlb_lock before decrementing h-\u003eresv_huge_pages","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm,hugetlb: take hugetlb_lock before decrementing h-\u003eresv_huge_pages\n\nThe h-\u003e*_huge_pages counters are protected by the hugetlb_lock, but\nalloc_huge_page has a corner case where it can decrement the counter\noutside of the lock.\n\nThis could lead to a corrupted value of h-\u003eresv_huge_pages, which we have\nobserved on our systems.\n\nTake the hugetlb_lock before decrementing h-\u003eresv_huge_pages to avoid a\npotential race.","modified":"2026-04-02T08:28:22.659024Z","published":"2025-09-15T14:21:21.504Z","related":["SUSE-SU-2025:03614-1"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50285.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/112a005d1ded04a4b41b6d01833cc0bda90625cc"},{"type":"WEB","url":"https://git.kernel.org/stable/c/11993652d0b49e27272db0a37aa828d8a3a4b92b"},{"type":"WEB","url":"https://git.kernel.org/stable/c/12df140f0bdfae5dcfc81800970dd7f6f632e00c"},{"type":"WEB","url":"https://git.kernel.org/stable/c/2b35432d324898ec41beb27031d2a1a864a4d40e"},{"type":"WEB","url":"https://git.kernel.org/stable/c/3e50a07b6a5fcd39df1534d3fdaca4292a65efe6"},{"type":"WEB","url":"https://git.kernel.org/stable/c/568e3812b1778b4c0c229649b59977d88f400ece"},{"type":"WEB","url":"https://git.kernel.org/stable/c/629c986e19fe9481227c7cdfd9a105bbc104d245"},{"type":"WEB","url":"https://git.kernel.org/stable/c/c828fab903725279aa9dc6ae3d44bb7e4778f92c"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50285.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50285"},{"type":"PACKAGE","url":"https://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"},{"last_affected":"3f5fae4d1a3189d95b02b4b45e1218df147122bc"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50285.json"}}],"schema_version":"1.7.5"}