CVE-2024-57883
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2024-57883 affects the Linux kernel's memory management subsystem, specifically the hugetlb component. The vulnerability was discovered and disclosed in January 2025, impacting the folio refcount mechanism in the huge page table management. The issue occurs when the folio refcount may be unexpectedly increased through trygetfolio() by callers such as splithugepages (Kernel Git).

Technical details

The vulnerability stems from an incorrect check in hugepmdunshare() function where the refcount is used to determine whether a PMD page table is shared. When the refcount is increased by certain callers like damon, offlinepage, or pageidle, the check becomes invalid. This can lead to page table leaks, manifesting as a 'Bad page state' bug with nonzero mapcount and incorrect refcount handling (NVD).

Impact

The vulnerability results in two primary impacts: 1) The page table itself gets discarded after reporting the 'nonzero mapcount' error, and 2) The HugeTLB page mapped by the page table misses freeing since it's incorrectly treated as shared, and shared page tables are not unmapped. This leads to memory leaks in the system (Kernel Git).

Mitigation and workarounds

The issue has been fixed by introducing an independent PMD page table shared count. The fix involves reusing the ptsharecount field for x86/arm64/riscv PMDs, which was previously used alongside ptindex/ptmm/ptfragrefcount for other architectures. This provides a dedicated counter for tracking shared page tables (Kernel Git).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

“Best User Experience I have ever seen, provides full visibility to cloud workloads.”
David EstlickCISO
“Wiz provides a single pane of glass to see what is going on in our cloud environments.”
Adam FletcherChief Security Officer
“We know that if Wiz identifies something as critical, it actually is.”
Greg PoniatowskiHead of Threat and Vulnerability Management