CVE-2024-42316
Severity CVSS v4.0:
Pending analysis
Type:
CWE-369
Divide By Zero
Publication date:
17/08/2024
Last modified:
03/11/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
mm/mglru: fix div-by-zero in vmpressure_calc_level()<br />
<br />
evict_folios() uses a second pass to reclaim folios that have gone through<br />
page writeback and become clean before it finishes the first pass, since<br />
folio_rotate_reclaimable() cannot handle those folios due to the<br />
isolation.<br />
<br />
The second pass tries to avoid potential double counting by deducting<br />
scan_control->nr_scanned. However, this can result in underflow of<br />
nr_scanned, under a condition where shrink_folio_list() does not increment<br />
nr_scanned, i.e., when folio_trylock() fails.<br />
<br />
The underflow can cause the divisor, i.e., scale=scanned+reclaimed in<br />
vmpressure_calc_level(), to become zero, resulting in the following crash:<br />
<br />
[exception RIP: vmpressure_work_fn+101]<br />
process_one_work at ffffffffa3313f2b<br />
<br />
Since scan_control->nr_scanned has no established semantics, the potential<br />
double counting has minimal risks. Therefore, fix the problem by not<br />
deducting scan_control->nr_scanned in evict_folios().
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.1 (including) | 6.1.103 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.2 (including) | 6.6.44 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (including) | 6.10.3 (excluding) |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/8b671fe1a879923ecfb72dda6caf01460dd885ef
- https://git.kernel.org/stable/c/8de7bf77f21068a5f602bb1e59adbc5ab533509d
- https://git.kernel.org/stable/c/a39e38be632f0e1c908d70d1c9cd071c03faf895
- https://git.kernel.org/stable/c/d6510f234c7d117790397f9bb150816b0a954a04
- https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html



