Skip to contentSkip to conversation

CVE-2025-39916: mm/damon/reclaim: avoid divide-by-zero in damon_reclaim_apply_parameters()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Oct 1, 2025

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/damon/reclaim: avoid divide-by-zero in damon_reclaim_apply_parameters()

When creating a new scheme of DAMON_RECLAIM, the calculation of 'min_age_region' uses 'aggr_interval' as the divisor, which may lead to division-by-zero errors. Fix it by directly returning -EINVAL when such a case occurs.

The Linux kernel CVE team has assigned CVE-2025-39916 to this issue.

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

	Issue introduced in 6.1 with commit f5a79d7c0c87c8d88bb5e3f3c898258fdf1b3b05 and fixed in 6.1.153 with commit 64dc351e58271c1e9005e42f5216b4f3d7a39b66
	Issue introduced in 6.1 with commit f5a79d7c0c87c8d88bb5e3f3c898258fdf1b3b05 and fixed in 6.6.107 with commit 9fe0415156fbde773b31f920201cb70b1f0e40fe
	Issue introduced in 6.1 with commit f5a79d7c0c87c8d88bb5e3f3c898258fdf1b3b05 and fixed in 6.12.48 with commit 5d6eeb3c683c777ed4538eb3a650bb7da17a7cff
	Issue introduced in 6.1 with commit f5a79d7c0c87c8d88bb5e3f3c898258fdf1b3b05 and fixed in 6.16.8 with commit 40cb9b38b645126fdd1d6aa3d6811a8ad50ddfa1
	Issue introduced in 6.1 with commit f5a79d7c0c87c8d88bb5e3f3c898258fdf1b3b05 and fixed in 6.17 with commit e6b543ca9806d7bced863f43020e016ee996c057
	Issue introduced in 6.0.12 with commit fd3e613a912bbb344ee18579cc2ad3329aacba41

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-2025-39916

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/damon/reclaim.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/64dc351e58271c1e9005e42f5216b4f3d7a39b66
	https://git.kernel.org/stable/c/9fe0415156fbde773b31f920201cb70b1f0e40fe
	https://git.kernel.org/stable/c/5d6eeb3c683c777ed4538eb3a650bb7da17a7cff
	https://git.kernel.org/stable/c/40cb9b38b645126fdd1d6aa3d6811a8ad50ddfa1
	https://git.kernel.org/stable/c/e6b543ca9806d7bced863f43020e016ee996c057