Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 A9C063515F2 for ; Sat, 25 Jul 2026 08:52:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784969546; cv=none; b=HVQ2tQIuvzX7LtypOaLJWck9rOtXbyGAa99XzG1Uqn9FdVGs73vYYN24ph90lrKFsXotRvaVXXDpyyKGe6xy7FeUIso/azyG+vDYJTyTmEGWmLKUWNOptpquskAfwfNIkK4Gx4tmp78jYZMgloo06elK3U1s0qxtRWYzuMUtNgM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784969546; c=relaxed/simple; bh=Qu2QIkRThmPe4RyPkX5fF4bPCkyPSMmrwjDCxaNL3HI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=PhSeUG7DZ4IEOy40pANDMr2szVEI6gw1yHelJj4E8IUHRqh692NneuAxYNCUewNvGSQvETV2l6mC8COHlAnbjikW+s97f7Lt9BxqwzjOam6ODqlAtJGdrfr4CbAWs/DkkCz+nTXtmCushiTY87fpX7RcUxblb2lryGkDiDeHk+8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ck7O5hpr; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="ck7O5hpr" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CD9931F000E9; Sat, 25 Jul 2026 08:52:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784969545; bh=HWNUxFxWURM5aDcdHEI6EC5FRnLgnMZ87qOllEV/GYk=; h=From:To:Cc:Subject:Date:Reply-To; b=ck7O5hprpa2eqffRW+ZtdfhiBoCaeLW9vn6u/Zu7nUmLBEJFqK9XwFqhmS6/PagPA MnCCIoaL37Fnl5s4NAxRiQ4fksdJvYuZ1xUuD8L/9AUK1OTDKA3/PFwaRzJSnQsAQ7 eYKlonLdWQoEbwVhtlyWVtSxRxSV6p7vdpgoLQV8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-64295: mm: page_ext: add count limit to page_ext_iter_next to prevent invalid PFN access Date: Sat, 25 Jul 2026 10:48:32 +0200 Message-ID: <2026072505-CVE-2026-64295-29f9@gregkh> X-Mailer: git-send-email 2.55.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3759; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=L65iLy0AZJCmG50VWQejYu0q6i7zUXs/XB49J/inBc0=; b=owGbwMvMwCRo6H6F97bub03G02pJDFkpFa6rDsf0dO8Ms+AwDBKv+eL2u7KQd4GxS4tUZNaBb kn3hwUdsSwMgkwMsmKKLF+28RzdX3FI0cvQ9jTMHFYmkCEMXJwCMBGnaQwLLjje6VR+sSbZoVL5 MutPAXn/6BmGDAtWrHoU11Q19W64eYZEnIaUFWtlAwsA 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: page_ext: add count limit to page_ext_iter_next to prevent invalid PFN access The page_ext iteration API does not validate if the PFN still belongs to a valid section while advancing the iterator. When dynamically adding memory in the hotplug path, it can lead to a NULL pointer dereference during page_ext_lookup at the boundary of the last valid section when iterator count equals __pgcount. The for_each_page_ext() macro calls page_ext_iter_next() as its loop increment. for_each_page_ext() does a "__page_ext = page_ext_iter_next(&__iter)" at the end. This causes page_ext_iter_next() to increment iter->index past __pgcount and call page_ext_lookup(start_pfn + __pgcount). During memory hotplug (online), the PFN at start_pfn + __pgcount may belong to a section that has not yet been initialized, causing page_ext_lookup() to trigger a NULL pointer dereference. [ 14.555124][ T846] Call trace: [ 14.555125][ T846] lookup_page_ext+0x6c/0x108 (P) [ 14.555127][ T846] page_ext_lookup+0x30/0x3c [ 14.555129][ T846] __reset_page_owner+0x11c/0x260 [ 14.571201][ T846] __free_pages_ok+0x5e8/0x8e0 [ 14.571204][ T846] __free_pages_core+0x78/0xf0 [ 14.571206][ T846] generic_online_page+0x14/0x24 [ 14.597782][ T846] online_pages+0x178/0x30c [ 14.597784][ T846] memory_block_change_state+0x284/0x32c [ 14.597787][ T846] memory_subsys_online+0x4c/0x64 [ 14.597789][ T846] device_online+0x88/0xb0 [ 14.597791][ T846] online_memory_block+0x30/0x40 [ 14.597793][ T846] walk_memory_blocks+0xac/0xe8 [ 14.597794][ T846] add_memory_resource+0x280/0x298 [ 14.656161][ T846] add_memory+0x60/0x98 Move the iteration boundary enforcement inside the iterator functions, so callers cannot inadvertently access beyond the requested range. The Linux kernel CVE team has assigned CVE-2026-64295 to this issue. Affected and fixed versions =========================== Issue introduced in 6.15 with commit 9039b9096ea27a20f0349d1537537663c935c8ed and fixed in 6.18.39 with commit 8dcaa0f87a88d720d13106f3a306c6b61d189d86 Issue introduced in 6.15 with commit 9039b9096ea27a20f0349d1537537663c935c8ed and fixed in 7.1.4 with commit 377b1cd6bbcf327338cd951cc2fd74bc75540235 Issue introduced in 6.15 with commit 9039b9096ea27a20f0349d1537537663c935c8ed and fixed in 7.2-rc3 with commit ffd017237cfe99e6e5602ab14179b0e6878a0840 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-64295 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: include/linux/page_ext.h 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/8dcaa0f87a88d720d13106f3a306c6b61d189d86 https://git.kernel.org/stable/c/377b1cd6bbcf327338cd951cc2fd74bc75540235 https://git.kernel.org/stable/c/ffd017237cfe99e6e5602ab14179b0e6878a0840