Skip to contentSkip to conversation

CVE-2026-99704: mm/page-writeback: avoid 32-bit overflow in dirty threshold shares

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Nov 20

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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.

The Linux kernel CVE team has assigned CVE-2026-99704 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 6.2 with commit ae82291e9ca47c3d6da6b77a00f427754aca413e and fixed in 6.12.118 with commit 64783904ec5eb7240c9e035122367294757311ed
	Issue introduced in 6.2 with commit ae82291e9ca47c3d6da6b77a00f427754aca413e and fixed in 6.18.64 with commit 45a2f3102660845d4992ae20587e9afe7c613485
	Issue introduced in 6.2 with commit ae82291e9ca47c3d6da6b77a00f427754aca413e and fixed in 7.3.5 with commit d342881c5bb75460ae28cfd2006e21dbf9aec443
	Issue introduced in 6.2 with commit ae82291e9ca47c3d6da6b77a00f427754aca413e and fixed in 7.4-rc2 with commit 9597c2056e05bd79df9d343a9b42e84a54de1c52

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-99704

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
mm/page-writeback.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/64783904ec5eb7240c9e035122367294757311ed
	https://git.kernel.org/stable/c/45a2f3102660845d4992ae20587e9afe7c613485
	https://git.kernel.org/stable/c/d342881c5bb75460ae28cfd2006e21dbf9aec443
	https://git.kernel.org/stable/c/9597c2056e05bd79df9d343a9b42e84a54de1c52