CVE-2024-42316: mm/mglru: fix div-by-zero in vmpressure_calc_level()

Published Aug 17, 2024
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

mm/mglru: fix div-by-zero in vmpressurecalclevel()

evictfolios() uses a second pass to reclaim folios that have gone through page writeback and become clean before it finishes the first pass, since foliorotatereclaimable() cannot handle those folios due to the isolation.

The second pass tries to avoid potential double counting by deducting scancontrol->nrscanned. However, this can result in underflow of nrscanned, under a condition where shrinkfoliolist() does not increment nrscanned, i.e., when foliotrylock() fails.

The underflow can cause the divisor, i.e., scale=scanned+reclaimed in vmpressurecalclevel(), to become zero, resulting in the following crash:

[exception RIP: vmpressureworkfn+101] processonework at ffffffffa3313f2b

Since scancontrol->nrscanned has no established semantics, the potential double counting has minimal risks. Therefore, fix the problem by not deducting scancontrol->nrscanned in evictfolios().

Affected Software

7 affected componentsFixes available
Linux Linux kernel>=6.1<6.1.103
Linux Linux kernel>=6.2<6.6.44
Linux Linux kernel>=6.7<6.10.3
debian/linux
5.10.223-15.10.234-16.1.129-16.1.135-16.12.25-1
debian/linux-6.1
6.1.129-1~deb11u1
Microsoft azl3 kernel 6.6.43.1-7
Microsoft azl3 kernel 6.6.47.1-1

Event History

Aug 17, 2024
CVE Published
via MITRE·09:09 AM
Data Sourced
via MITRE·09:09 AM
Description
Data Sourced
via NVD·09:15 AM
RemedyDescriptionSeverityWeaknessAffected Software
Sep 11, 2024
Data Sourced
via Microsoft·07:00 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·07:00 AM
Affected Software
Updated
via Microsoft·07:00 AM
SeverityAffected Software
Updated
via Microsoft·07:00 AM
DescriptionSeverity
Jan 13, 2025
Data Sourced
via Ubuntu·06:29 PM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2024-42316?

CVE-2024-42316 has a medium severity rating due to the potential impact on system stability and reliability.

2

How do I fix CVE-2024-42316?

To fix CVE-2024-42316, you should update to a patched version of the Linux kernel that resolves the vulnerability.

3

What versions of the Linux kernel are affected by CVE-2024-42316?

Versions of the Linux kernel between 6.1 and 6.6 are affected by CVE-2024-42316.

4

What potential impact does CVE-2024-42316 have on my system?

CVE-2024-42316 could lead to a division by zero error, which may result in system instability during memory pressure conditions.

5

Is there a known exploit for CVE-2024-42316?

Currently, there are no public exploits reported for CVE-2024-42316, but it is important to apply updates to mitigate any risk.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203