CVE-2024-42316

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

MEDIUM
5.5
CVSS Score
Published: August 17, 2024 at 09:09 AM UTC
Updated: June 17, 2026 at 07:49 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

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().

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

6.1 ≤ v < 6.1.1036.1 ≤ v < 6.10.36.1 ≤ v < 6.116.1 ≤ v < 6.6.446.2 ≤ v < 6.6.446.7 ≤ v < 6.10.3359a5e1416caaf9ce28396a65ed3e386cc5de6636.1
Vendor states this is fixed in 8b671fe1a879923ecfb72dda6caf01460dd885ef (fixed)
Vendor states this is fixed in 8de7bf77f21068a5f602bb1e59adbc5ab533509d (fixed)
Vendor states this is fixed in a39e38be632f0e1c908d70d1c9cd071c03faf895 (fixed)
Vendor states this is fixed in d6510f234c7d117790397f9bb150816b0a954a04 (fixed)
Vendor states this is fixed in 6.1 (unaffected)
Vendor states this is fixed in 6.1.103 (unaffected)
Vendor states this is fixed in 6.10.3 (unaffected)
Vendor states this is fixed in 6.11 (unaffected)
Vendor states this is fixed in 6.6.44 (unaffected)

References (5)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/8b671fe1a879923ecfb72dda6caf01460dd885ef
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/8de7bf77f21068a5f602bb1e59adbc5ab533509d
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/a39e38be632f0e1c908d70d1c9cd071c03faf895
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/d6510f234c7d117790397f9bb150816b0a954a04
Source: af854a3a-2127-422b-91ae-364da2661108
https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-369

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card