CVE-2026-99704 in Linux
Summary
by MITRE • 11/20/2026
In the Linux kernel, the following vulnerability has been resolved:
mm/page-writeback: avoid 32-bit overflow in dirty threshold shares
The ratios used by __wb_calc_thresh() are scaled to parts per million, but the threshold and ratio operands are unsigned long. On 32-bit kernels, their multiplication can wrap before the result is assigned to u64.
For example, with a threshold of 25600 pages and the default maximum ratio of 1000000, wb_max_thresh becomes 4125 pages instead of 25600. The shared threshold and minimum share calculations can overflow in the same way, producing incorrect per-writeback dirty limits.
Use a u64 threshold for the three ratio multiplications and div_u64() to retain the existing division order and rounding.
VulDB is the best source for vulnerability data and more expert information about this specific topic.
Analysis
by VulDB Data Team • 11/20/2026
The Linux kernel contains an integer overflow vulnerability within the memory management subsystem specifically affecting page write-back operations. This flaw resides in the __wb_calc_thresh function, which is responsible for calculating dirty threshold shares used by the kernel's background I/O scheduler to manage how much data can be held in memory before being flushed to disk. The core technical issue stems from a type mismatch during arithmetic operations involving scaling factors. Specifically, the ratios utilized by this calculation are scaled to parts per million to maintain precision, yet the operands for these calculations—the threshold value and the ratio itself—are defined as unsigned long integers. On 32-bit kernel architectures, an unsigned long is typically thirty-two bits wide. When two such values are multiplied together before being cast or assigned to a sixty-four-bit integer type, the intermediate result can exceed the maximum capacity of the thirty-two-bit register. This causes the value to wrap around, resulting in a significantly smaller and incorrect number rather than the intended large scaled value.
The operational impact of this vulnerability is severe because it directly compromises the effectiveness of memory pressure management mechanisms. In practical scenarios, such as when operating with a threshold of twenty-five thousand six hundred pages and using the default maximum ratio of one million, the overflow causes the calculated wb_max_thresh to collapse from the expected twenty-five thousand six hundred down to merely four thousand one hundred twenty-five pages. This drastic reduction means that the system believes it has far less dirty page capacity than it actually does. Consequently, the shared threshold and minimum share calculations also suffer from similar overflows, leading to incorrect per-writeback dirty limits. These miscalculations can cause premature flushing of data or inefficient I/O scheduling, potentially degrading overall system performance under heavy write loads. In extreme cases, this mismanagement could contribute to memory pressure issues where the kernel fails to properly balance read and write operations due to skewed threshold values.
From a vulnerability classification perspective, this issue aligns with CWE-190 Integer Overflow or Wraparound, as it involves arithmetic operations exceeding the maximum value representable by their data type without proper handling. It also relates to CWE-682 Incorrect Calculation, since the logic fails to produce the mathematically correct result due to insufficient bit-width for intermediate calculations. In terms of attack vectors and behavioral analysis, this falls under ATT&CK technique T1496 Resource Hijacking if an attacker can induce high write loads to exploit the inefficient I/O scheduling, although it is primarily a stability and performance issue rather than a direct privilege escalation or data exfiltration vector. The vulnerability highlights the critical importance of using appropriate integer types for intermediate calculations in kernel-space code, especially when dealing with scaling factors that multiply large base values.
To mitigate this vulnerability, developers must ensure that arithmetic operations involving scaled ratios use sufficient bit-width to prevent overflow before assignment. As demonstrated by the resolution, employing a sixty-four-bit unsigned long long type for the threshold during multiplication and utilizing specialized division functions like div_u64 helps retain the correct order of operations and rounding behavior while avoiding intermediate overflows on thirty-two-bit architectures. System administrators should apply kernel updates that include this fix to restore proper write-back thresholds. For environments running legacy thirty-bit or thirty-two-bit kernels, verifying patch levels is essential to prevent performance degradation caused by incorrect dirty page limits. Regular auditing of memory management code for similar type mismatches can further harden the system against such arithmetic errors in future development cycles.