CVE-2024-57883: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: mm: hugetlb: independent PMD page table shared count The folio refcount may be increased unexpectly through try_get_folio() by caller such as split_huge_pages. In huge_pmd_unshare(), we use refcount to check whether a pmd page table is shared. The check is incorrect if the refcount is increased by the above caller, and this can cause the page table leaked: BUG: Bad page state in process sh pfn:109324 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x66 pfn:0x109324 flags: 0x17ffff800000000(node=0|zone=2|lastcpupid=0xfffff) page_type: f2(table) raw: 017ffff800000000 0000000000000000 0000000000000000 0000000000000000 raw: 0000000000000066 0000000000000000 00000000f2000000 0000000000000000 page dumped because: nonzero mapcount ... CPU: 31 UID: 0 PID: 7515 Comm: sh Kdump: loaded Tainted: G B 6.13.0-rc2master+ #7 Tainted: [B]=BAD_PAGE Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015 Call trace: show_stack+0x20/0x38 (C) dump_stack_lvl+0x80/0xf8 dump_stack+0x18/0x28 bad_page+0x8c/0x130 free_page_is_bad_report+0xa4/0xb0 free_unref_page+0x3cc/0x620 __folio_put+0xf4/0x158 split_huge_pages_all+0x1e0/0x3e8 split_huge_pages_write+0x25c/0x2d8 full_proxy_write+0x64/0xd8 vfs_write+0xcc/0x280 ksys_write+0x70/0x110 __arm64_sys_write+0x24/0x38 invoke_syscall+0x50/0x120 el0_svc_common.constprop.0+0xc8/0xf0 do_el0_svc+0x24/0x38 el0_svc+0x34/0x128 el0t_64_sync_handler+0xc8/0xd0 el0t_64_sync+0x190/0x198 The issue may be triggered by damon, offline_page, page_idle, etc, which will increase the refcount of page table. 1. The page table itself will be discarded after reporting the "nonzero mapcount". 2. The HugeTLB page mapped by the page table miss freeing since we treat the page table as shared and a shared page table will not be unmapped. Fix it by introducing independent PMD page table shared count. As described by comment, pt_index/pt_mm/pt_frag_refcount are used for s390 gmap, x86 pgds and powerpc, pt_share_count is used for x86/arm64/riscv pmds, so we can reuse the field as pt_share_count.
AI Analysis
Technical Summary
CVE-2024-57883 is a vulnerability identified in the Linux kernel's memory management subsystem, specifically within the HugeTLB (Huge Translation Lookaside Buffer) page handling mechanism. The flaw arises from an incorrect reference count management of page tables at the PMD (Page Middle Directory) level. In detail, the kernel function try_get_folio(), which can be called by routines such as split_huge_pages, may unexpectedly increase the folio reference count. The vulnerability manifests because the huge_pmd_unshare() function relies on this reference count to determine if a PMD page table is shared. However, due to the unexpected increment, the check becomes inaccurate, leading to a scenario where the page table is mistakenly considered shared and thus not properly freed. This results in a memory leak of the page table and the HugeTLB pages it maps. The kernel may report a "nonzero mapcount" error and a "Bad page state" bug, indicating corrupted or leaked page structures. The issue can be triggered by kernel components such as damon, offline_page, and page_idle, which interact with page table reference counts. The fix involves introducing an independent PMD page table shared count (pt_share_count) to correctly track sharing status, reusing existing fields used in other architectures for similar purposes. This vulnerability affects Linux kernel versions identified by the commit hash 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa and is relevant to architectures including x86, arm64, and riscv. No known exploits are currently reported in the wild, and no CVSS score has been assigned yet.
Potential Impact
For European organizations, this vulnerability primarily poses a risk to the stability and reliability of Linux-based systems, especially those utilizing HugeTLB pages for performance optimization in memory-intensive applications. The memory leak and improper page table handling can lead to system instability, potential crashes, and degraded performance. While the vulnerability does not directly enable privilege escalation or remote code execution, the resulting kernel instability could be exploited indirectly to cause denial of service (DoS) conditions. This is particularly critical for data centers, cloud service providers, and enterprises relying on Linux servers for critical infrastructure, as unexpected kernel faults can disrupt services and lead to downtime. Systems running workloads with heavy memory management demands, such as databases, virtualization hosts, and high-performance computing clusters, are at higher risk. Given the widespread use of Linux in European governmental, financial, and industrial sectors, the vulnerability could impact a broad range of organizations if unpatched. However, exploitation requires local access and specific kernel interactions, limiting remote attack vectors. The absence of known exploits reduces immediate threat but does not eliminate the risk of future weaponization.
Mitigation Recommendations
European organizations should prioritize updating their Linux kernels to versions that include the fix for CVE-2024-57883 as soon as patches become available from their Linux distribution vendors. Since the vulnerability involves kernel memory management internals, applying vendor-supplied kernel updates is the most effective mitigation. For environments where immediate patching is not feasible, organizations should monitor kernel logs for signs of "nonzero mapcount" errors or "Bad page state" messages, which may indicate attempts to trigger the flaw. Limiting access to systems to trusted users and processes reduces the risk of exploitation, as local privilege is required to trigger the vulnerability. Additionally, organizations should audit and restrict usage of kernel features or tools known to interact with HugeTLB pages and page table reference counts, such as damon and offline_page, especially in multi-tenant or shared environments. Employing kernel live patching solutions where supported can help mitigate risk without requiring full system reboots. Finally, integrating this vulnerability into vulnerability management and incident response workflows will ensure timely detection and remediation.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Poland, Italy, Spain
CVE-2024-57883: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: mm: hugetlb: independent PMD page table shared count The folio refcount may be increased unexpectly through try_get_folio() by caller such as split_huge_pages. In huge_pmd_unshare(), we use refcount to check whether a pmd page table is shared. The check is incorrect if the refcount is increased by the above caller, and this can cause the page table leaked: BUG: Bad page state in process sh pfn:109324 page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x66 pfn:0x109324 flags: 0x17ffff800000000(node=0|zone=2|lastcpupid=0xfffff) page_type: f2(table) raw: 017ffff800000000 0000000000000000 0000000000000000 0000000000000000 raw: 0000000000000066 0000000000000000 00000000f2000000 0000000000000000 page dumped because: nonzero mapcount ... CPU: 31 UID: 0 PID: 7515 Comm: sh Kdump: loaded Tainted: G B 6.13.0-rc2master+ #7 Tainted: [B]=BAD_PAGE Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015 Call trace: show_stack+0x20/0x38 (C) dump_stack_lvl+0x80/0xf8 dump_stack+0x18/0x28 bad_page+0x8c/0x130 free_page_is_bad_report+0xa4/0xb0 free_unref_page+0x3cc/0x620 __folio_put+0xf4/0x158 split_huge_pages_all+0x1e0/0x3e8 split_huge_pages_write+0x25c/0x2d8 full_proxy_write+0x64/0xd8 vfs_write+0xcc/0x280 ksys_write+0x70/0x110 __arm64_sys_write+0x24/0x38 invoke_syscall+0x50/0x120 el0_svc_common.constprop.0+0xc8/0xf0 do_el0_svc+0x24/0x38 el0_svc+0x34/0x128 el0t_64_sync_handler+0xc8/0xd0 el0t_64_sync+0x190/0x198 The issue may be triggered by damon, offline_page, page_idle, etc, which will increase the refcount of page table. 1. The page table itself will be discarded after reporting the "nonzero mapcount". 2. The HugeTLB page mapped by the page table miss freeing since we treat the page table as shared and a shared page table will not be unmapped. Fix it by introducing independent PMD page table shared count. As described by comment, pt_index/pt_mm/pt_frag_refcount are used for s390 gmap, x86 pgds and powerpc, pt_share_count is used for x86/arm64/riscv pmds, so we can reuse the field as pt_share_count.
AI-Powered Analysis
Technical Analysis
CVE-2024-57883 is a vulnerability identified in the Linux kernel's memory management subsystem, specifically within the HugeTLB (Huge Translation Lookaside Buffer) page handling mechanism. The flaw arises from an incorrect reference count management of page tables at the PMD (Page Middle Directory) level. In detail, the kernel function try_get_folio(), which can be called by routines such as split_huge_pages, may unexpectedly increase the folio reference count. The vulnerability manifests because the huge_pmd_unshare() function relies on this reference count to determine if a PMD page table is shared. However, due to the unexpected increment, the check becomes inaccurate, leading to a scenario where the page table is mistakenly considered shared and thus not properly freed. This results in a memory leak of the page table and the HugeTLB pages it maps. The kernel may report a "nonzero mapcount" error and a "Bad page state" bug, indicating corrupted or leaked page structures. The issue can be triggered by kernel components such as damon, offline_page, and page_idle, which interact with page table reference counts. The fix involves introducing an independent PMD page table shared count (pt_share_count) to correctly track sharing status, reusing existing fields used in other architectures for similar purposes. This vulnerability affects Linux kernel versions identified by the commit hash 39dde65c9940c97fcd178a3d2b1c57ed8b7b68aa and is relevant to architectures including x86, arm64, and riscv. No known exploits are currently reported in the wild, and no CVSS score has been assigned yet.
Potential Impact
For European organizations, this vulnerability primarily poses a risk to the stability and reliability of Linux-based systems, especially those utilizing HugeTLB pages for performance optimization in memory-intensive applications. The memory leak and improper page table handling can lead to system instability, potential crashes, and degraded performance. While the vulnerability does not directly enable privilege escalation or remote code execution, the resulting kernel instability could be exploited indirectly to cause denial of service (DoS) conditions. This is particularly critical for data centers, cloud service providers, and enterprises relying on Linux servers for critical infrastructure, as unexpected kernel faults can disrupt services and lead to downtime. Systems running workloads with heavy memory management demands, such as databases, virtualization hosts, and high-performance computing clusters, are at higher risk. Given the widespread use of Linux in European governmental, financial, and industrial sectors, the vulnerability could impact a broad range of organizations if unpatched. However, exploitation requires local access and specific kernel interactions, limiting remote attack vectors. The absence of known exploits reduces immediate threat but does not eliminate the risk of future weaponization.
Mitigation Recommendations
European organizations should prioritize updating their Linux kernels to versions that include the fix for CVE-2024-57883 as soon as patches become available from their Linux distribution vendors. Since the vulnerability involves kernel memory management internals, applying vendor-supplied kernel updates is the most effective mitigation. For environments where immediate patching is not feasible, organizations should monitor kernel logs for signs of "nonzero mapcount" errors or "Bad page state" messages, which may indicate attempts to trigger the flaw. Limiting access to systems to trusted users and processes reduces the risk of exploitation, as local privilege is required to trigger the vulnerability. Additionally, organizations should audit and restrict usage of kernel features or tools known to interact with HugeTLB pages and page table reference counts, such as damon and offline_page, especially in multi-tenant or shared environments. Employing kernel live patching solutions where supported can help mitigate risk without requiring full system reboots. Finally, integrating this vulnerability into vulnerability management and incident response workflows will ensure timely detection and remediation.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2025-01-11T14:45:42.024Z
- Cisa Enriched
- false
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d9822c4522896dcbde963
Added to database: 5/21/2025, 9:08:50 AM
Last enriched: 6/28/2025, 8:39:58 AM
Last updated: 8/17/2025, 8:52:24 AM
Views: 21
Related Threats
CVE-2025-50859: n/a
HighCVE-2025-50858: n/a
HighCVE-2025-55454: n/a
HighCVE-2025-51092: n/a
HighCVE-2025-43759: CWE-732 Incorrect Permission Assignment for Critical Resource in Liferay Portal
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.