// For flags

CVE-2024-26720

mm/writeback: fix possible divide-by-zero in wb_dirty_limits(), again

Severity Score

5.5
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

Track
*SSVC
Descriptions

In the Linux kernel, the following vulnerability has been resolved:

mm/writeback: fix possible divide-by-zero in wb_dirty_limits(), again

(struct dirty_throttle_control *)->thresh is an unsigned long, but is
passed as the u32 divisor argument to div_u64(). On architectures where
unsigned long is 64 bytes, the argument will be implicitly truncated.

Use div64_u64() instead of div_u64() so that the value used in the "is
this a safe division" check is the same as the divisor.

Also, remove redundant cast of the numerator to u64, as that should happen
implicitly.

This would be difficult to exploit in memcg domain, given the ratio-based
arithmetic domain_drity_limits() uses, but is much easier in global
writeback domain with a BDI_CAP_STRICTLIMIT-backing device, using e.g.
vm.dirty_bytes=(1<<32)*PAGE_SIZE so that dtc->thresh == (1<<32)

En el kernel de Linux, se resolvió la siguiente vulnerabilidad: mm/writeback: corrige la posible división por cero en wb_dirty_limits(), nuevamente (struct dirty_throttle_control *)-&gt;thresh es un largo sin firmar, pero se pasa como argumento del divisor u32 a div_u64(). En arquitecturas donde la longitud sin firmar es de 64 bytes, el argumento se truncará implícitamente. Utilice div64_u64() en lugar de div_u64() para que el valor utilizado en la comprobación "¿Es esta una división segura" sea el mismo que el divisor? Además, elimine la conversión redundante del numerador a u64, ya que eso debería suceder implícitamente. Esto sería difícil de explotar en el dominio memcg, dado el uso de la aritmética basada en proporciones domain_drity_limits(), pero es mucho más fácil en el dominio de reescritura global con un dispositivo de respaldo BDI_CAP_STRICTLIMIT, usando, por ejemplo, vm.dirty_bytes=(1&lt;&lt;32)*PAGE_SIZE de modo que dtc-&gt;thresh == (1&lt;&lt;32)

A vulnerability was found in the wb_dirty_limits() function in the Linux kernel memory management (mm) subsystem which can lead to a divide-by-zero error. This issue could lead to a potential kernel crash.

*Credits: N/A
CVSS Scores
Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
* Common Vulnerability Scoring System
SSVC
  • Decision:Track
Exploitation
None
Automatable
No
Tech. Impact
Partial
* Organization's Worst-case Scenario
Timeline
  • 2024-02-19 CVE Reserved
  • 2024-04-03 CVE Published
  • 2024-07-19 EPSS Updated
  • 2024-09-11 CVE Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-369: Divide By Zero
CAPEC
References (21)
URL Date SRC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 3.16 < 4.19.307
Search vendor "Linux" for product "Linux Kernel" and version " >= 3.16 < 4.19.307"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 3.16 < 4.19.318
Search vendor "Linux" for product "Linux Kernel" and version " >= 3.16 < 4.19.318"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 3.16 < 5.4.269
Search vendor "Linux" for product "Linux Kernel" and version " >= 3.16 < 5.4.269"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 3.16 < 5.4.280
Search vendor "Linux" for product "Linux Kernel" and version " >= 3.16 < 5.4.280"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 3.16 < 5.10.210
Search vendor "Linux" for product "Linux Kernel" and version " >= 3.16 < 5.10.210"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 3.16 < 5.10.222
Search vendor "Linux" for product "Linux Kernel" and version " >= 3.16 < 5.10.222"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 3.16 < 5.15.149
Search vendor "Linux" for product "Linux Kernel" and version " >= 3.16 < 5.15.149"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 3.16 < 5.15.163
Search vendor "Linux" for product "Linux Kernel" and version " >= 3.16 < 5.15.163"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 3.16 < 6.1.79
Search vendor "Linux" for product "Linux Kernel" and version " >= 3.16 < 6.1.79"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 3.16 < 6.1.98
Search vendor "Linux" for product "Linux Kernel" and version " >= 3.16 < 6.1.98"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 3.16 < 6.6.18
Search vendor "Linux" for product "Linux Kernel" and version " >= 3.16 < 6.6.18"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 3.16 < 6.6.39
Search vendor "Linux" for product "Linux Kernel" and version " >= 3.16 < 6.6.39"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 3.16 < 6.7.6
Search vendor "Linux" for product "Linux Kernel" and version " >= 3.16 < 6.7.6"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 3.16 < 6.8
Search vendor "Linux" for product "Linux Kernel" and version " >= 3.16 < 6.8"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
>= 3.16 < 6.9.9
Search vendor "Linux" for product "Linux Kernel" and version " >= 3.16 < 6.9.9"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
3.12.27
Search vendor "Linux" for product "Linux Kernel" and version "3.12.27"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
3.14.16
Search vendor "Linux" for product "Linux Kernel" and version "3.14.16"
en
Affected
Linux
Search vendor "Linux"
Linux Kernel
Search vendor "Linux" for product "Linux Kernel"
3.15.9
Search vendor "Linux" for product "Linux Kernel" and version "3.15.9"
en
Affected