CVE-2024-42316: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: mm/mglru: fix div-by-zero in vmpressure_calc_level() evict_folios() uses a second pass to reclaim folios that have gone through page writeback and become clean before it finishes the first pass, since folio_rotate_reclaimable() cannot handle those folios due to the isolation. The second pass tries to avoid potential double counting by deducting scan_control->nr_scanned. However, this can result in underflow of nr_scanned, under a condition where shrink_folio_list() does not increment nr_scanned, i.e., when folio_trylock() fails. The underflow can cause the divisor, i.e., scale=scanned+reclaimed in vmpressure_calc_level(), to become zero, resulting in the following crash: [exception RIP: vmpressure_work_fn+101] process_one_work at ffffffffa3313f2b Since scan_control->nr_scanned has no established semantics, the potential double counting has minimal risks. Therefore, fix the problem by not deducting scan_control->nr_scanned in evict_folios().
AI Analysis
Technical Summary
CVE-2024-42316 is a vulnerability identified in the Linux kernel's memory management subsystem, specifically within the mglru (multi-generational least recently used) page reclaim mechanism. The flaw arises in the function vmpressure_calc_level(), which calculates memory pressure levels based on scanned and reclaimed memory pages (folios). The vulnerability is triggered by an underflow condition in the variable scan_control->nr_scanned during the evict_folios() process. This function performs a two-pass reclamation of folios that have undergone page writeback and become clean. To avoid double counting, evict_folios() deducts nr_scanned in the second pass. However, if folio_trylock() fails, shrink_folio_list() does not increment nr_scanned, causing the deduction to underflow and the divisor (scale = scanned + reclaimed) in vmpressure_calc_level() to become zero. This zero divisor leads to a division-by-zero error, causing a kernel crash (panic) at vmpressure_work_fn. The root cause is a logic error in handling the accounting of scanned folios during memory reclaim, which can be exploited to cause a denial of service (DoS) by crashing the kernel. The fix involves removing the deduction of nr_scanned in evict_folios(), as the potential double counting has minimal risk and the deduction causes the underflow. There are no known exploits in the wild, and no CVSS score has been assigned yet. The vulnerability affects Linux kernel versions identified by the commit hash 359a5e1416caaf9ce28396a65ed3e386cc5de663 and similar builds. This issue is primarily a stability and availability concern rather than a confidentiality or integrity breach.
Potential Impact
For European organizations, the impact of CVE-2024-42316 centers on system availability and stability. Linux is widely deployed across European enterprises, government agencies, cloud providers, and critical infrastructure, often powering servers, network devices, and embedded systems. A kernel crash induced by this vulnerability can cause unexpected system reboots or service interruptions, leading to downtime and potential disruption of business-critical applications. In environments with high availability requirements, such as financial services, healthcare, telecommunications, and public sector services, such disruptions can have significant operational and reputational consequences. Although this vulnerability does not directly expose data or allow privilege escalation, the denial of service effect could be leveraged by attackers to degrade service or as part of a larger attack chain. Systems running workloads with high memory pressure or frequent page reclamation are more susceptible to triggering this fault. Given Linux's prevalence in cloud infrastructure, this vulnerability could also impact European cloud service providers and their customers, potentially affecting multi-tenant environments and virtualized workloads.
Mitigation Recommendations
To mitigate CVE-2024-42316, European organizations should prioritize updating their Linux kernel to the patched versions that remove the problematic deduction of nr_scanned in evict_folios(). Kernel updates should be applied promptly following vendor advisories. For environments where immediate patching is not feasible, organizations should monitor system logs for kernel panics or vmpressure_work_fn exceptions indicative of this issue. Implementing robust system monitoring and alerting can help detect early signs of exploitation attempts or instability. Additionally, workload placement strategies can be adjusted to reduce memory pressure on vulnerable systems, such as tuning memory management parameters or limiting memory-intensive processes. Organizations should also review their incident response plans to include procedures for handling unexpected kernel crashes and potential denial of service scenarios. For cloud environments, coordination with service providers to ensure timely patch deployment is critical. Finally, maintaining comprehensive backups and redundancy can minimize operational impact from unexpected outages caused by this vulnerability.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Italy, Spain, Poland, Belgium
CVE-2024-42316: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: mm/mglru: fix div-by-zero in vmpressure_calc_level() evict_folios() uses a second pass to reclaim folios that have gone through page writeback and become clean before it finishes the first pass, since folio_rotate_reclaimable() cannot handle those folios due to the isolation. The second pass tries to avoid potential double counting by deducting scan_control->nr_scanned. However, this can result in underflow of nr_scanned, under a condition where shrink_folio_list() does not increment nr_scanned, i.e., when folio_trylock() fails. The underflow can cause the divisor, i.e., scale=scanned+reclaimed in vmpressure_calc_level(), to become zero, resulting in the following crash: [exception RIP: vmpressure_work_fn+101] process_one_work at ffffffffa3313f2b Since scan_control->nr_scanned has no established semantics, the potential double counting has minimal risks. Therefore, fix the problem by not deducting scan_control->nr_scanned in evict_folios().
AI-Powered Analysis
Technical Analysis
CVE-2024-42316 is a vulnerability identified in the Linux kernel's memory management subsystem, specifically within the mglru (multi-generational least recently used) page reclaim mechanism. The flaw arises in the function vmpressure_calc_level(), which calculates memory pressure levels based on scanned and reclaimed memory pages (folios). The vulnerability is triggered by an underflow condition in the variable scan_control->nr_scanned during the evict_folios() process. This function performs a two-pass reclamation of folios that have undergone page writeback and become clean. To avoid double counting, evict_folios() deducts nr_scanned in the second pass. However, if folio_trylock() fails, shrink_folio_list() does not increment nr_scanned, causing the deduction to underflow and the divisor (scale = scanned + reclaimed) in vmpressure_calc_level() to become zero. This zero divisor leads to a division-by-zero error, causing a kernel crash (panic) at vmpressure_work_fn. The root cause is a logic error in handling the accounting of scanned folios during memory reclaim, which can be exploited to cause a denial of service (DoS) by crashing the kernel. The fix involves removing the deduction of nr_scanned in evict_folios(), as the potential double counting has minimal risk and the deduction causes the underflow. There are no known exploits in the wild, and no CVSS score has been assigned yet. The vulnerability affects Linux kernel versions identified by the commit hash 359a5e1416caaf9ce28396a65ed3e386cc5de663 and similar builds. This issue is primarily a stability and availability concern rather than a confidentiality or integrity breach.
Potential Impact
For European organizations, the impact of CVE-2024-42316 centers on system availability and stability. Linux is widely deployed across European enterprises, government agencies, cloud providers, and critical infrastructure, often powering servers, network devices, and embedded systems. A kernel crash induced by this vulnerability can cause unexpected system reboots or service interruptions, leading to downtime and potential disruption of business-critical applications. In environments with high availability requirements, such as financial services, healthcare, telecommunications, and public sector services, such disruptions can have significant operational and reputational consequences. Although this vulnerability does not directly expose data or allow privilege escalation, the denial of service effect could be leveraged by attackers to degrade service or as part of a larger attack chain. Systems running workloads with high memory pressure or frequent page reclamation are more susceptible to triggering this fault. Given Linux's prevalence in cloud infrastructure, this vulnerability could also impact European cloud service providers and their customers, potentially affecting multi-tenant environments and virtualized workloads.
Mitigation Recommendations
To mitigate CVE-2024-42316, European organizations should prioritize updating their Linux kernel to the patched versions that remove the problematic deduction of nr_scanned in evict_folios(). Kernel updates should be applied promptly following vendor advisories. For environments where immediate patching is not feasible, organizations should monitor system logs for kernel panics or vmpressure_work_fn exceptions indicative of this issue. Implementing robust system monitoring and alerting can help detect early signs of exploitation attempts or instability. Additionally, workload placement strategies can be adjusted to reduce memory pressure on vulnerable systems, such as tuning memory management parameters or limiting memory-intensive processes. Organizations should also review their incident response plans to include procedures for handling unexpected kernel crashes and potential denial of service scenarios. For cloud environments, coordination with service providers to ensure timely patch deployment is critical. Finally, maintaining comprehensive backups and redundancy can minimize operational impact from unexpected outages caused by this vulnerability.
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.278Z
- Cisa Enriched
- true
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d9828c4522896dcbe1f02
Added to database: 5/21/2025, 9:08:56 AM
Last enriched: 6/29/2025, 7:10:40 AM
Last updated: 8/14/2025, 9:46:00 PM
Views: 9
Related Threats
CVE-2025-9356: Stack-based Buffer Overflow in Linksys RE6250
HighCVE-2025-9355: Stack-based Buffer Overflow in Linksys RE6250
HighCVE-2025-43761: CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') in Liferay Portal
MediumCVE-2025-24902: CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') in LabRedesCefetRJ WeGIA
CriticalCVE-2025-52451: CWE-20 Improper Input Validation in Salesforce Tableau Server
HighActions
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.