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 BC62337289C for ; Fri, 5 Sep 2025 17:23:07 +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=1757092987; cv=none; b=jsRX9YFy9W1ktRSSrW3gjXLDHqfGCYSa+PfKg3RrEZgeqj3bAXAdYiUI5QovOC6l+dw/uPVoP0GOv8AngmbWcuuf7ACBwpv0bjmZa84M+tVgE/PRMu453NHs7ipj8HtDol4GRu2FIVW+iD8iRFg9Wvd0ybdqklamKUmS8/p8Gtk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757092987; c=relaxed/simple; bh=6+xycu8Sdie9fljiV2PB0TcfINXb6T97S/AUVXtFAd0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=j3eLpIgLc+KEOZCgOd6SNGMlAlX3/zkz0tXcIQ1ZbBtNTVGlcxSOmTzZbK+NBW0Q6Z9x5zqtnFUKD8eKPrYYVkqvatV30HpF6viOpSgcOL68fzy9X2R4xPfau/pCN9hH8s6pAXxASKo87ONkeAeXMNq2Dr5MjK6d0TWt+NTQp8w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=fSnMl6ul; 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="fSnMl6ul" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1A60FC4CEF1; Fri, 5 Sep 2025 17:23:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757092987; bh=6+xycu8Sdie9fljiV2PB0TcfINXb6T97S/AUVXtFAd0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=fSnMl6uliuzgU7svOyo7tzFLdRWihmfWpr14m/PqnRd1vq/VoDYjQ2xQlAMImMsJP Aj/eyRYdw9JMwmRZFE97YZkTgCFuYoEv0hlEa1ZSVvQBVuJgzxy6AODlSDykv8oW9Y cNZUkmDL7hqwqfW8fY6EB/NEnUMp4xGk8mAL7E30= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-39700: mm/damon/ops-common: ignore migration request to invalid nodes Date: Fri, 5 Sep 2025 19:21:13 +0200 Message-ID: <2025090548-CVE-2025-39700-a0ce@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=3656; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=G2I+f+lEtr1CBWof1EFAL5uQyfw9YIw3Je1LtL58XYQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDBm7pT9Mrf7l4KZbpvdRdoLQ5VVrImtSl6krMBTyuPyKO ZvxdPq1jlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjI+68M8+w5a6s2mC/ZvWyZ 1ol1h7foPVv7LothwW6vNZNeujzJ3XbxsWluZfbS/V08jwA= 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/ops-common: ignore migration request to invalid nodes damon_migrate_pages() tries migration even if the target node is invalid. If users mistakenly make such invalid requests via DAMOS_MIGRATE_{HOT,COLD} action, the below kernel BUG can happen. [ 7831.883495] BUG: unable to handle page fault for address: 0000000000001f48 [ 7831.884160] #PF: supervisor read access in kernel mode [ 7831.884681] #PF: error_code(0x0000) - not-present page [ 7831.885203] PGD 0 P4D 0 [ 7831.885468] Oops: Oops: 0000 [#1] SMP PTI [ 7831.885852] CPU: 31 UID: 0 PID: 94202 Comm: kdamond.0 Not tainted 6.16.0-rc5-mm-new-damon+ #93 PREEMPT(voluntary) [ 7831.886913] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-4.el9 04/01/2014 [ 7831.887777] RIP: 0010:__alloc_frozen_pages_noprof (include/linux/mmzone.h:1724 include/linux/mmzone.h:1750 mm/page_alloc.c:4936 mm/page_alloc.c:5137) [...] [ 7831.895953] Call Trace: [ 7831.896195] [ 7831.896397] __folio_alloc_noprof (mm/page_alloc.c:5183 mm/page_alloc.c:5192) [ 7831.896787] migrate_pages_batch (mm/migrate.c:1189 mm/migrate.c:1851) [ 7831.897228] ? __pfx_alloc_migration_target (mm/migrate.c:2137) [ 7831.897735] migrate_pages (mm/migrate.c:2078) [ 7831.898141] ? __pfx_alloc_migration_target (mm/migrate.c:2137) [ 7831.898664] damon_migrate_folio_list (mm/damon/ops-common.c:321 mm/damon/ops-common.c:354) [ 7831.899140] damon_migrate_pages (mm/damon/ops-common.c:405) [...] Add a target node validity check in damon_migrate_pages(). The validity check is stolen from that of do_pages_move(), which is being used for the move_pages() system call. The Linux kernel CVE team has assigned CVE-2025-39700 to this issue. Affected and fixed versions =========================== Issue introduced in 6.11 with commit b51820ebea656be3b48bb16dcdc5ad3f203c4fd7 and fixed in 6.12.44 with commit 7c303fa1f311aadc17fa82b7bbf776412adf45de Issue introduced in 6.11 with commit b51820ebea656be3b48bb16dcdc5ad3f203c4fd7 and fixed in 6.16.4 with commit 9d0c2d15aff96746f99a7c97221bb8ce5b62db19 Issue introduced in 6.11 with commit b51820ebea656be3b48bb16dcdc5ad3f203c4fd7 and fixed in 6.17-rc1 with commit 7e6c3130690a01076efdf45aa02ba5d5c16849a0 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-39700 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/ops-common.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/7c303fa1f311aadc17fa82b7bbf776412adf45de https://git.kernel.org/stable/c/9d0c2d15aff96746f99a7c97221bb8ce5b62db19 https://git.kernel.org/stable/c/7e6c3130690a01076efdf45aa02ba5d5c16849a0