CVE-2024-42241: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: mm/shmem: disable PMD-sized page cache if needed For shmem files, it's possible that PMD-sized page cache can't be supported by xarray. For example, 512MB page cache on ARM64 when the base page size is 64KB can't be supported by xarray. It leads to errors as the following messages indicate when this sort of xarray entry is split. WARNING: CPU: 34 PID: 7578 at lib/xarray.c:1025 xas_split_alloc+0xf8/0x128 Modules linked in: binfmt_misc nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 \ nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject \ nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 \ ip_set rfkill nf_tables nfnetlink vfat fat virtio_balloon drm fuse xfs \ libcrc32c crct10dif_ce ghash_ce sha2_ce sha256_arm64 sha1_ce virtio_net \ net_failover virtio_console virtio_blk failover dimlib virtio_mmio CPU: 34 PID: 7578 Comm: test Kdump: loaded Tainted: G W 6.10.0-rc5-gavin+ #9 Hardware name: QEMU KVM Virtual Machine, BIOS edk2-20240524-1.el9 05/24/2024 pstate: 83400005 (Nzcv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--) pc : xas_split_alloc+0xf8/0x128 lr : split_huge_page_to_list_to_order+0x1c4/0x720 sp : ffff8000882af5f0 x29: ffff8000882af5f0 x28: ffff8000882af650 x27: ffff8000882af768 x26: 0000000000000cc0 x25: 000000000000000d x24: ffff00010625b858 x23: ffff8000882af650 x22: ffffffdfc0900000 x21: 0000000000000000 x20: 0000000000000000 x19: ffffffdfc0900000 x18: 0000000000000000 x17: 0000000000000000 x16: 0000018000000000 x15: 52f8004000000000 x14: 0000e00000000000 x13: 0000000000002000 x12: 0000000000000020 x11: 52f8000000000000 x10: 52f8e1c0ffff6000 x9 : ffffbeb9619a681c x8 : 0000000000000003 x7 : 0000000000000000 x6 : ffff00010b02ddb0 x5 : ffffbeb96395e378 x4 : 0000000000000000 x3 : 0000000000000cc0 x2 : 000000000000000d x1 : 000000000000000c x0 : 0000000000000000 Call trace: xas_split_alloc+0xf8/0x128 split_huge_page_to_list_to_order+0x1c4/0x720 truncate_inode_partial_folio+0xdc/0x160 shmem_undo_range+0x2bc/0x6a8 shmem_fallocate+0x134/0x430 vfs_fallocate+0x124/0x2e8 ksys_fallocate+0x4c/0xa0 __arm64_sys_fallocate+0x24/0x38 invoke_syscall.constprop.0+0x7c/0xd8 do_el0_svc+0xb4/0xd0 el0_svc+0x44/0x1d8 el0t_64_sync_handler+0x134/0x150 el0t_64_sync+0x17c/0x180 Fix it by disabling PMD-sized page cache when HPAGE_PMD_ORDER is larger than MAX_PAGECACHE_ORDER. As Matthew Wilcox pointed, the page cache in a shmem file isn't represented by a multi-index entry and doesn't have this limitation when the xarry entry is split until commit 6b24ca4a1a8d ("mm: Use multi-index entries in the page cache").
AI Analysis
Technical Summary
CVE-2024-42241 is a vulnerability identified in the Linux kernel's memory management subsystem, specifically related to the handling of page cache for shared memory (shmem) files. The issue arises when the kernel attempts to use PMD-sized (Page Middle Directory) page cache entries for shmem files on architectures such as ARM64 where the base page size is large (e.g., 64KB). In such cases, the xarray data structure, which manages page cache entries, cannot properly support PMD-sized entries. This limitation leads to errors during operations that split xarray entries, causing kernel warnings and potential instability. The vulnerability manifests as kernel warnings and errors, such as those logged by the function xas_split_alloc, and can lead to memory management faults. The root cause is that the page cache for shmem files is not represented by multi-index entries, unlike other file types, and this discrepancy was introduced after commit 6b24ca4a1a8d ("mm: Use multi-index entries in the page cache"). The fix involves disabling the use of PMD-sized page cache entries when the huge page order exceeds the maximum supported page cache order, preventing the problematic xarray splits. This vulnerability affects Linux kernel versions incorporating the specified commit and is particularly relevant for ARM64 systems with large base page sizes. While no known exploits are reported in the wild, the vulnerability could cause system instability or crashes under specific workloads involving shmem file operations and large page caches.
Potential Impact
For European organizations, the impact of CVE-2024-42241 primarily concerns systems running Linux kernels with the affected commit, especially on ARM64 architectures or other platforms using large base page sizes (e.g., 64KB). Such systems are often found in cloud infrastructure, virtualization hosts, and high-performance computing environments. The vulnerability can lead to kernel warnings, memory management errors, and potential system instability or crashes when applications heavily utilize shmem files with large page caches. This could disrupt critical services, cause downtime, and impact data integrity if memory faults occur during file operations. Organizations relying on ARM64-based servers or virtualized environments for workloads such as telecommunications, financial services, research institutions, and cloud providers in Europe may face operational risks. Although no direct exploitation is known, the instability risk necessitates prompt patching to maintain system reliability and prevent potential denial-of-service conditions. Additionally, the complexity of the issue means that debugging and recovery could be challenging, increasing operational overhead.
Mitigation Recommendations
European organizations should take the following specific mitigation steps: 1) Identify Linux systems running kernels with the affected commit or versions derived from it, focusing on ARM64 and other architectures with large base page sizes. 2) Apply the official Linux kernel patch that disables PMD-sized page cache entries when the huge page order exceeds the maximum supported page cache order. This patch prevents the problematic xarray splits and stabilizes shmem file handling. 3) For systems where immediate patching is not feasible, consider disabling or limiting the use of huge pages for shmem files or adjusting system configurations to avoid large PMD-sized page caches. 4) Monitor kernel logs for warnings related to xas_split_alloc or shmem operations to detect potential exploitation or instability. 5) Test kernel updates in staging environments to ensure compatibility with existing workloads, especially those involving shared memory and huge pages. 6) Maintain up-to-date backups and disaster recovery plans to mitigate risks from unexpected system crashes. 7) Engage with Linux distribution vendors for timely updates and security advisories related to this vulnerability. These targeted actions go beyond generic advice by focusing on architecture-specific configurations and kernel patching strategies.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Norway, Denmark, Ireland, Switzerland
CVE-2024-42241: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: mm/shmem: disable PMD-sized page cache if needed For shmem files, it's possible that PMD-sized page cache can't be supported by xarray. For example, 512MB page cache on ARM64 when the base page size is 64KB can't be supported by xarray. It leads to errors as the following messages indicate when this sort of xarray entry is split. WARNING: CPU: 34 PID: 7578 at lib/xarray.c:1025 xas_split_alloc+0xf8/0x128 Modules linked in: binfmt_misc nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 \ nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject \ nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 \ ip_set rfkill nf_tables nfnetlink vfat fat virtio_balloon drm fuse xfs \ libcrc32c crct10dif_ce ghash_ce sha2_ce sha256_arm64 sha1_ce virtio_net \ net_failover virtio_console virtio_blk failover dimlib virtio_mmio CPU: 34 PID: 7578 Comm: test Kdump: loaded Tainted: G W 6.10.0-rc5-gavin+ #9 Hardware name: QEMU KVM Virtual Machine, BIOS edk2-20240524-1.el9 05/24/2024 pstate: 83400005 (Nzcv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--) pc : xas_split_alloc+0xf8/0x128 lr : split_huge_page_to_list_to_order+0x1c4/0x720 sp : ffff8000882af5f0 x29: ffff8000882af5f0 x28: ffff8000882af650 x27: ffff8000882af768 x26: 0000000000000cc0 x25: 000000000000000d x24: ffff00010625b858 x23: ffff8000882af650 x22: ffffffdfc0900000 x21: 0000000000000000 x20: 0000000000000000 x19: ffffffdfc0900000 x18: 0000000000000000 x17: 0000000000000000 x16: 0000018000000000 x15: 52f8004000000000 x14: 0000e00000000000 x13: 0000000000002000 x12: 0000000000000020 x11: 52f8000000000000 x10: 52f8e1c0ffff6000 x9 : ffffbeb9619a681c x8 : 0000000000000003 x7 : 0000000000000000 x6 : ffff00010b02ddb0 x5 : ffffbeb96395e378 x4 : 0000000000000000 x3 : 0000000000000cc0 x2 : 000000000000000d x1 : 000000000000000c x0 : 0000000000000000 Call trace: xas_split_alloc+0xf8/0x128 split_huge_page_to_list_to_order+0x1c4/0x720 truncate_inode_partial_folio+0xdc/0x160 shmem_undo_range+0x2bc/0x6a8 shmem_fallocate+0x134/0x430 vfs_fallocate+0x124/0x2e8 ksys_fallocate+0x4c/0xa0 __arm64_sys_fallocate+0x24/0x38 invoke_syscall.constprop.0+0x7c/0xd8 do_el0_svc+0xb4/0xd0 el0_svc+0x44/0x1d8 el0t_64_sync_handler+0x134/0x150 el0t_64_sync+0x17c/0x180 Fix it by disabling PMD-sized page cache when HPAGE_PMD_ORDER is larger than MAX_PAGECACHE_ORDER. As Matthew Wilcox pointed, the page cache in a shmem file isn't represented by a multi-index entry and doesn't have this limitation when the xarry entry is split until commit 6b24ca4a1a8d ("mm: Use multi-index entries in the page cache").
AI-Powered Analysis
Technical Analysis
CVE-2024-42241 is a vulnerability identified in the Linux kernel's memory management subsystem, specifically related to the handling of page cache for shared memory (shmem) files. The issue arises when the kernel attempts to use PMD-sized (Page Middle Directory) page cache entries for shmem files on architectures such as ARM64 where the base page size is large (e.g., 64KB). In such cases, the xarray data structure, which manages page cache entries, cannot properly support PMD-sized entries. This limitation leads to errors during operations that split xarray entries, causing kernel warnings and potential instability. The vulnerability manifests as kernel warnings and errors, such as those logged by the function xas_split_alloc, and can lead to memory management faults. The root cause is that the page cache for shmem files is not represented by multi-index entries, unlike other file types, and this discrepancy was introduced after commit 6b24ca4a1a8d ("mm: Use multi-index entries in the page cache"). The fix involves disabling the use of PMD-sized page cache entries when the huge page order exceeds the maximum supported page cache order, preventing the problematic xarray splits. This vulnerability affects Linux kernel versions incorporating the specified commit and is particularly relevant for ARM64 systems with large base page sizes. While no known exploits are reported in the wild, the vulnerability could cause system instability or crashes under specific workloads involving shmem file operations and large page caches.
Potential Impact
For European organizations, the impact of CVE-2024-42241 primarily concerns systems running Linux kernels with the affected commit, especially on ARM64 architectures or other platforms using large base page sizes (e.g., 64KB). Such systems are often found in cloud infrastructure, virtualization hosts, and high-performance computing environments. The vulnerability can lead to kernel warnings, memory management errors, and potential system instability or crashes when applications heavily utilize shmem files with large page caches. This could disrupt critical services, cause downtime, and impact data integrity if memory faults occur during file operations. Organizations relying on ARM64-based servers or virtualized environments for workloads such as telecommunications, financial services, research institutions, and cloud providers in Europe may face operational risks. Although no direct exploitation is known, the instability risk necessitates prompt patching to maintain system reliability and prevent potential denial-of-service conditions. Additionally, the complexity of the issue means that debugging and recovery could be challenging, increasing operational overhead.
Mitigation Recommendations
European organizations should take the following specific mitigation steps: 1) Identify Linux systems running kernels with the affected commit or versions derived from it, focusing on ARM64 and other architectures with large base page sizes. 2) Apply the official Linux kernel patch that disables PMD-sized page cache entries when the huge page order exceeds the maximum supported page cache order. This patch prevents the problematic xarray splits and stabilizes shmem file handling. 3) For systems where immediate patching is not feasible, consider disabling or limiting the use of huge pages for shmem files or adjusting system configurations to avoid large PMD-sized page caches. 4) Monitor kernel logs for warnings related to xas_split_alloc or shmem operations to detect potential exploitation or instability. 5) Test kernel updates in staging environments to ensure compatibility with existing workloads, especially those involving shared memory and huge pages. 6) Maintain up-to-date backups and disaster recovery plans to mitigate risks from unexpected system crashes. 7) Engage with Linux distribution vendors for timely updates and security advisories related to this vulnerability. These targeted actions go beyond generic advice by focusing on architecture-specific configurations and kernel patching strategies.
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
- 2024-07-30T07:40:12.254Z
- Cisa Enriched
- true
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d9827c4522896dcbe1cb2
Added to database: 5/21/2025, 9:08:55 AM
Last enriched: 6/29/2025, 6:10:51 AM
Last updated: 7/31/2025, 1:33:16 PM
Views: 14
Related Threats
CVE-2025-34154: CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in Synergetic Data Systems Inc. UnForm Server Manager
CriticalCVE-2025-8927: Improper Restriction of Excessive Authentication Attempts in mtons mblog
MediumCVE-2025-43988: n/a
CriticalCVE-2025-8926: SQL Injection in SourceCodester COVID 19 Testing Management System
MediumCVE-2025-43986: n/a
CriticalActions
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.