Skip to main content

CVE-2024-41021: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2024-41021cvecve-2024-41021
Published: Mon Jul 29 2024 (07/29/2024, 13:34:22 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: s390/mm: Fix VM_FAULT_HWPOISON handling in do_exception() There is no support for HWPOISON, MEMORY_FAILURE, or ARCH_HAS_COPY_MC on s390. Therefore we do not expect to see VM_FAULT_HWPOISON in do_exception(). However, since commit af19487f00f3 ("mm: make PTE_MARKER_SWAPIN_ERROR more general"), it is possible to see VM_FAULT_HWPOISON in combination with PTE_MARKER_POISONED, even on architectures that do not support HWPOISON otherwise. In this case, we will end up on the BUG() in do_exception(). Fix this by treating VM_FAULT_HWPOISON the same as VM_FAULT_SIGBUS, similar to x86 when MEMORY_FAILURE is not configured. Also print unexpected fault flags, for easier debugging. Note that VM_FAULT_HWPOISON_LARGE is not expected, because s390 cannot support swap entries on other levels than PTE level.

AI-Powered Analysis

AILast updated: 06/29/2025, 03:40:53 UTC

Technical Analysis

CVE-2024-41021 is a vulnerability identified in the Linux kernel specifically affecting the s390 architecture, which is IBM's mainframe platform. The issue arises from improper handling of the VM_FAULT_HWPOISON fault in the do_exception() function within the memory management subsystem. The s390 architecture does not support hardware poisoning features such as HWPOISON, MEMORY_FAILURE, or ARCH_HAS_COPY_MC, and therefore should not encounter VM_FAULT_HWPOISON faults. However, due to a prior kernel commit (af19487f00f3) that generalized the PTE_MARKER_SWAPIN_ERROR handling, it became possible for VM_FAULT_HWPOISON to appear in conjunction with PTE_MARKER_POISONED even on architectures like s390 that do not support these features. This unexpected condition leads to the kernel triggering a BUG() call in do_exception(), which results in a kernel panic or system crash. The fix implemented treats VM_FAULT_HWPOISON the same way as VM_FAULT_SIGBUS faults on s390, mirroring the behavior on x86 systems when MEMORY_FAILURE is not configured, and adds logging for unexpected fault flags to aid debugging. This correction prevents the kernel from crashing due to unhandled VM_FAULT_HWPOISON faults on s390 systems. The vulnerability is specific to a particular commit range and affects Linux kernel versions containing the problematic commit. No known exploits are reported in the wild, and the issue is primarily a stability and availability concern for systems running Linux on s390 hardware.

Potential Impact

For European organizations utilizing IBM mainframe systems running Linux on the s390 architecture, this vulnerability poses a risk of unexpected system crashes due to unhandled memory fault conditions. Such crashes can lead to denial of service, disrupting critical business operations, especially in sectors like finance, government, and large enterprises where mainframes are prevalent. The impact on confidentiality and integrity is minimal since the vulnerability does not enable privilege escalation or data leakage. However, availability is significantly affected as kernel panics can cause downtime and require manual intervention to recover. Given the specialized nature of s390 systems, the threat is limited to organizations with this hardware and Linux kernel versions containing the vulnerable commit. The absence of known exploits reduces immediate risk, but the potential for stability issues necessitates prompt patching to maintain operational continuity.

Mitigation Recommendations

European organizations using Linux on s390 mainframes should promptly apply the kernel patch that addresses CVE-2024-41021. This involves updating to a Linux kernel version that includes the fix treating VM_FAULT_HWPOISON faults as VM_FAULT_SIGBUS on s390. System administrators should verify kernel versions and monitor vendor advisories for updated kernel releases. Additionally, enabling detailed kernel logging can help detect unexpected fault flags early. Organizations should implement robust system monitoring and alerting to quickly identify and respond to kernel panics or memory fault anomalies. Testing patches in staging environments before production deployment is recommended to ensure stability. Since this vulnerability is architecture-specific, organizations without s390 hardware are not affected. Maintaining an inventory of hardware architectures and kernel versions in use will aid targeted patch management. Finally, engaging with IBM and Linux vendor support channels can provide additional guidance and updates.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-07-12T12:17:45.613Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9827c4522896dcbe1692

Added to database: 5/21/2025, 9:08:55 AM

Last enriched: 6/29/2025, 3:40:53 AM

Last updated: 7/26/2025, 12:20:07 PM

Views: 12

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats