{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-42316","id":"CVE-2024-42316","title":"mm/mglru: fix div-by-zero in vmpressure_calc_level()","description":"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 coun","descriptionLong":"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().","published":"2024-08-17T09:09:24.694Z","updated":"2026-10-28T02:30:50.708329619Z","reserved":"2024-07-30T07:40:12.278Z","status":"Modified","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"},"metrics":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"}],"rating":"medium","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"359a5e1416caaf9ce28396a65ed3e386cc5de663","lessThan":"8de7bf77f21068a5f602bb1e59adbc5ab533509d","status":"affected","versionType":"git"},{"version":"359a5e1416caaf9ce28396a65ed3e386cc5de663","lessThan":"d6510f234c7d117790397f9bb150816b0a954a04","status":"affected","versionType":"git"},{"version":"359a5e1416caaf9ce28396a65ed3e386cc5de663","lessThan":"a39e38be632f0e1c908d70d1c9cd071c03faf895","status":"affected","versionType":"git"},{"version":"359a5e1416caaf9ce28396a65ed3e386cc5de663","lessThan":"8b671fe1a879923ecfb72dda6caf01460dd885ef","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.1","status":"affected"},{"version":"0","lessThan":"6.1","status":"unaffected","versionType":"semver"},{"version":"6.1.103","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.44","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.10.3","lessThanOrEqual":"6.10.*","status":"unaffected","versionType":"semver"},{"version":"6.11","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":["CWE-369"],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/8de7bf77f21068a5f602bb1e59adbc5ab533509d","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/d6510f234c7d117790397f9bb150816b0a954a04","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/a39e38be632f0e1c908d70d1c9cd071c03faf895","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/8b671fe1a879923ecfb72dda6caf01460dd885ef","tags":["Patch","web"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/42xxx/CVE-2024-42316.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-42316","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.0021,"epssPercentile":0.11264,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-42316","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-42316","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-42316","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-42316","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}