Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5A568274B34 for ; Wed, 1 Oct 2025 07:47:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759304867; cv=none; b=oNGwJkWBxh/LoJv3t49jobfuZTVRwlO/XeEKYHnphYrTD2hQvLNnq/WkhtQpQxEt+BBBFCeoECZSIh2o4eCObsFXU3G6SarrRHNkvKCp0uPvSqVAaJaaKMgzj5Y9E6RpjeL/UvwO5FjBJBUMNDn6yau40ev2+7zuCsT61phjr4M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759304867; c=relaxed/simple; bh=XRFXUmic4UIMYB6TDntTF589UB81NWanqZFrjCchYqg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=cR5l/6Lu6KCqjBQPNU7hPe6hMAxDMtGgleuz7TWhv+HC8tP6k+RCVBtq1oRp0ABsdoFV2ZEjt7PJ4QknSscghns4w+iL0QmvbSKhi5Cy3FmiZjEjQnt5iGo539b0UDmAVFdPYCQhLBFi73U7H2y8KtukSxywwggWKOC2ZA/b0oM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=qPsHHXi6; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="qPsHHXi6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DBCC9C4CEF4; Wed, 1 Oct 2025 07:47:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1759304867; bh=XRFXUmic4UIMYB6TDntTF589UB81NWanqZFrjCchYqg=; h=From:To:Cc:Subject:Date:Reply-to:From; b=qPsHHXi6V+bwrtWes3qcYKxmTWtV9ePdWQJ+pyLGuNJ3qURwhougwC/SzwTXHp1dv BnePGnYKqGaESpQsk2UN5bl0BRYgdY/svz/UXrl6W3iwyGnBPYyHuaqt4SRKmNyM75 VkrMbyE5rDfryK+OaCrddGQ75MOPUMavv1hzgee0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-39909: mm/damon/lru_sort: avoid divide-by-zero in damon_lru_sort_apply_parameters() Date: Wed, 1 Oct 2025 09:47:14 +0200 Message-ID: <2025100109-CVE-2025-39909-202c@gregkh> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=3267; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=gjxVkHW2w0jLC1nMjW7d1BzYlXqelJUh2PSZ27n0wac=; b=owGbwMvMwCRo6H6F97bub03G02pJDBl37tQm/I2uzXf36r32+573jYWX5M/fKFy6aOE8s4IvF nk3f5w80hHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQAT0WBgmF/ad9F0/88pPkbz nomuNPAS7pLUUGeYn73J/5H/7LKAwpeL/uffE9of5r7xIAA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: mm/damon/lru_sort: avoid divide-by-zero in damon_lru_sort_apply_parameters() Patch series "mm/damon: avoid divide-by-zero in DAMON module's parameters application". DAMON's RECLAIM and LRU_SORT modules perform no validation on user-configured parameters during application, which may lead to division-by-zero errors. Avoid the divide-by-zero by adding validation checks when DAMON modules attempt to apply the parameters. This patch (of 2): During the calculation of 'hot_thres' and 'cold_thres', either 'sample_interval' or 'aggr_interval' is used as the divisor, which may lead to division-by-zero errors. Fix it by directly returning -EINVAL when such a case occurs. Additionally, since 'aggr_interval' is already required to be set no smaller than 'sample_interval' in damon_set_attrs(), only the case where 'sample_interval' is zero needs to be checked. The Linux kernel CVE team has assigned CVE-2025-39909 to this issue. Affected and fixed versions =========================== Issue introduced in 6.0 with commit 40e983cca9274e177bd5b9379299b44d9536ac68 and fixed in 6.1.153 with commit 74e391f7da7d9d5235a3cca88ee9fc18f720c75b Issue introduced in 6.0 with commit 40e983cca9274e177bd5b9379299b44d9536ac68 and fixed in 6.6.107 with commit 7bb675c9f0257840d33e5d1337d7e3afdd74a6bf Issue introduced in 6.0 with commit 40e983cca9274e177bd5b9379299b44d9536ac68 and fixed in 6.12.48 with commit af0ae62b935317bed1a1361c8c9579db9d300e70 Issue introduced in 6.0 with commit 40e983cca9274e177bd5b9379299b44d9536ac68 and fixed in 6.16.8 with commit 326a4b3750c71af3f3c52399ec4dbe33b6da4c26 Issue introduced in 6.0 with commit 40e983cca9274e177bd5b9379299b44d9536ac68 and fixed in 6.17 with commit 711f19dfd783ffb37ca4324388b9c4cb87e71363 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-39909 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/lru_sort.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/74e391f7da7d9d5235a3cca88ee9fc18f720c75b https://git.kernel.org/stable/c/7bb675c9f0257840d33e5d1337d7e3afdd74a6bf https://git.kernel.org/stable/c/af0ae62b935317bed1a1361c8c9579db9d300e70 https://git.kernel.org/stable/c/326a4b3750c71af3f3c52399ec4dbe33b6da4c26 https://git.kernel.org/stable/c/711f19dfd783ffb37ca4324388b9c4cb87e71363