{"id":"CVE-2024-42316","aliases":["CVE-2024-42316"],"related":[],"kind":"vulnerability","state":"published","title":"mm/mglru: fix div-by-zero in vmpressure_calc_level()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/mglru: fix div-by-zero in vmpressure_calc_level()\n\nevict_folios() uses a second pass to reclaim folios that have gone through\npage writeback and become clean before it finishes the first pass, since\nfolio_rotate_reclaimable() cannot handle those folios due to the\nisolation.\n\nThe second pass tries to avoid potential double counting by deducting\nscan_control->nr_scanned.  However, this can result in underflow of\nnr_scanned, under a condition where shrink_folio_list() does not increment\nnr_scanned, i.e., when folio_trylock() fails.\n\nThe underflow can cause the divisor, i.e., scale=scanned+reclaimed in\nvmpressure_calc_level(), to become zero, resulting in the following crash:\n\n  [exception RIP: vmpressure_work_fn+101]\n  process_one_work at ffffffffa3313f2b\n\nSince scan_control->nr_scanned has no established semantics, the potential\ndouble counting has minimal risks.  Therefore, fix the problem by not\ndeducting scan_control->nr_scanned in evict_folios().","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/mglru: fix div-by-zero in vmpressure_calc_level()\n\nevict_folios() uses a second pass to reclaim folios that have gone through\npage writeback and become clean before it finishes the first pass, since\nfolio_rotate_reclaimable() cannot handle those folios due to the\nisolation.\n\nThe second pass tries to avoid potential double counting by deducting\nscan_control->nr_scanned.  However, this can result in underflow of\nnr_scanned, under a condition where shrink_folio_list() does not increment\nnr_scanned, i.e., when folio_trylock() fails.\n\nThe underflow can cause the divisor, i.e., scale=scanned+reclaimed in\nvmpressure_calc_level(), to become zero, resulting in the following crash:\n\n  [exception RIP: vmpressure_work_fn+101]\n  process_one_work at ffffffffa3313f2b\n\nSince scan_control->nr_scanned has no established semantics, the potential\ndouble counting has minimal risks.  Therefore, fix the problem by not\ndeducting scan_control->nr_scanned in evict_folios().","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: mm/mglru: corrige div-by-zero en vmpression_calc_level() evict_folios() utiliza una segunda pasada para recuperar las publicaciones que han pasado por la reescritura de páginas y quedan limpias antes de finalizar el primer pase, ya que folio_rotate_reclaimable() no puede manejar esos folios debido al aislamiento. El segundo paso intenta evitar un posible doble conteo deduciendo scan_control-&gt;nr_scanned. Sin embargo, esto puede resultar en un desbordamiento insuficiente de nr_scanned, bajo una condición en la que Shrink_folio_list() no incrementa nr_scanned, es decir, cuando falla folio_trylock(). El desbordamiento insuficiente puede causar que el divisor, es decir, escala=escaneado+reclamado en vmpression_calc_level(), se convierta en cero, lo que resulta en el siguiente bloqueo: [excepción RIP: vmpression_work_fn+101] Process_one_work en ffffffffa3313f2b Dado que scan_control-&gt;nr_scanned no tiene una semántica establecida, la posible doble contabilización tiene riesgos mínimos. Por lo tanto, solucione el problema no deduciendo scan_control-&gt;nr_scanned en evict_folios().","source":"nvd"}],"published":"2024-08-17T09:09:24.694Z","modified":"2026-06-17T07:49:14.770Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-369"],"affected":[{"ranges":[{"type":"git","introduced":"359a5e1416caaf9ce28396a65ed3e386cc5de663","fixed":"8de7bf77f21068a5f602bb1e59adbc5ab533509d","status":"affected"},{"type":"git","introduced":"359a5e1416caaf9ce28396a65ed3e386cc5de663","fixed":"d6510f234c7d117790397f9bb150816b0a954a04","status":"affected"},{"type":"git","introduced":"359a5e1416caaf9ce28396a65ed3e386cc5de663","fixed":"a39e38be632f0e1c908d70d1c9cd071c03faf895","status":"affected"},{"type":"git","introduced":"359a5e1416caaf9ce28396a65ed3e386cc5de663","fixed":"8b671fe1a879923ecfb72dda6caf01460dd885ef","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.1","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.1","status":"unaffected"},{"type":"semver","introduced":"6.1.103","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.44","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.10.3","lastAffected":"6.10.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.11","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"6.1","fixed":"6.1.103"},{"status":"affected","introduced":"6.2","fixed":"6.6.44"},{"status":"affected","introduced":"6.7","fixed":"6.10.3"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/8de7bf77f21068a5f602bb1e59adbc5ab533509d","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d6510f234c7d117790397f9bb150816b0a954a04","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a39e38be632f0e1c908d70d1c9cd071c03faf895","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8b671fe1a879923ecfb72dda6caf01460dd885ef","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-09-10T16:09:42.817Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-42316","url":"https://www.cve.org/CVERecord?id=CVE-2024-42316","licence":"CVE Terms of Use","modified":"2026-05-11T20:30:05.431Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-42316","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-42316","licence":"Public domain","modified":"2026-06-17T07:49:14.770Z"}],"updatedAt":"2026-11-25T22:58:44.482Z","epss":{"score":0.0021,"percentile":0.11801,"date":"2026-12-01T12:00:22.000Z"}}