mm/hugetlb: fix hugetlb_pmd_shared()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 59d9094df3d79443937add8700b2ef1a866b1081 · < 69c4e241ff13545d410a8b2a688c932182a858bf| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
mm/hugetlb: fix hugetlb_pmd_shared()
Patch series "mm/hugetlb: fixes for PMD table sharing (incl. using mmu_gather)", v3.
One functional fix, one performance regression fix, and two related comment fixes.
I cleaned up my prototype I recently shared [1] for the performance fix, deferring most of the cleanups I had in the prototype to a later point. While doing that I identified the other things.
The goal of this patch set is to be backported to stable trees "fairly" easily. At least patch #1 and #4.
Patch #1 fixes hugetlb_pmd_shared() not detecting any sharing Patch #2 + #3 are simple comment fixes that patch #4 interacts with. Patch #4 is a fix for the reported performance regression due to excessive IPI broadcasts during fork()+exit().
The last patch is all about TLB flushes, IPIs and mmu_gather. Read: complicated
From the CVE record · Linux
The Linux kernel’s hugetlb_pmd_shared() fails to detect shared PMD tables after a change to how sharing is tracked. During page migration, such as with mbind() or migrate_pages(), folios mapped into shared tables can be migrated despite not being exclusive; smaps and pagemap can also incorrectly report them as private or exclusive. The input does not specify an attacker privilege requirement.
Engineers running Linux kernels with the affected hugetlb PMD-sharing code should check their kernel builds; affected versions are not specified.