CVE-2024-42131 mm: avoid overflows in dirty throttling logic
A root user can trigger integer overflows in Linux kernel dirty throttling logic by setting excessive memory limits, potentially causing system instability or crashes.
- Exploited in the wild
- Not known
- Login needed
- An administrator
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-42131?
CVE-2024-42131 is a medium-severity vulnerability in Linux kernel, published on 30 Jul 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
mm: avoid overflows in dirty throttling logic
The dirty throttling logic is interspersed with assumptions that dirty limits in PAGE_SIZE units fit into 32-bit (so that various multiplications fit into 64-bits). If limits end up being larger, we will hit overflows, possible divisions by 0 etc. Fix these problems by never allowing so large dirty limits as they have dubious practical value anyway. For dirty_bytes / dirty_background_bytes interfaces we can just refuse to set so large limits. For dirty_ratio / dirty_background_ratio it isn't so simple as the dirty limit is computed from the amount of available memory which can change due to memory hotplug etc. So when converting dirty limits from ratios to numbers of pages, we just don't allow the result to exceed UINT_MAX.
This is root-only triggerable problem which occurs when the operator sets dirty limits to >16 TB.
Weakness: CWE-190
Which versions are affected by CVE-2024-42131?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2024-42131?
Apply the vendor's patch.
Is CVE-2024-42131 being exploited?
There is no known exploitation of CVE-2024-42131 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2024-42131, DEBIAN-CVE-2024-42131, GHSA-vc72-g5gr-jp4w, UBUNTU-CVE-2024-42131.