mm,hugetlb: take hugetlb_lock before decrementing h->resv_huge_pages
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ a88c769548047b21f76fd71e04b6a3300ff17160 · < 112a005d1ded04a4b41b6d01833cc0bda90625cc| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
A race in the Linux kernel's huge-page allocation path can corrupt the reserved huge-page counter when it is decremented without holding hugetlb_lock. The input does not establish an attacker action or specify whether network access, authentication, or user interaction is required.
Engineers running Linux kernels with the affected hugetlb code should check their kernel version; affected versions are not specified.