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 9BA80353A76 for ; Sat, 25 Jul 2026 08:52:31 +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=1784969553; cv=none; b=JmcEJ5ZXf/NQaLBbbQxWcVgemPXwYTVj9awVQY5jVEp5m0B5A31K1So2UCW+zW0M4Z1n5rC+mRuVukDsiSNPULc8io7bXHecTErIro2rkDR58356XAO9YbcQh0oZrsL6I37H4JSCVlM1L3iVrTDNpA5GBfiHtPPBZwv4LnJ5CFw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784969553; c=relaxed/simple; bh=YasoSB2n4M6mVBBVAdCLjckQ3KCF7DnkOb/a7ltWH7A=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Hu+Fp/Wzl4Scw67MrlNoIS3fKi5eisStPhUjm/7wZmzodmJlei5+aZLKX2Gsfk5VWaK0MeKeOINsloCorsxMh0jze/2zmpBHpiT90GXVLB5Fuu9+0kHxddtwH7+iCiQEGoXaCEAAZh8asodiUyOeX/Oi0kD424uCTccl+MyrS1g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=gX4kNi95; 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="gX4kNi95" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5F6231F00A3A; Sat, 25 Jul 2026 08:52:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784969551; bh=23XM7i75lgOcslnvZN3T5BRxL4NJ1Ws75I5BLtpe2Ao=; h=From:To:Cc:Subject:Date:Reply-To; b=gX4kNi95xwiGvUvhy7SYEGT5nFIaO9koTJV5PcM4Teng4OAvv2uyBY1ICMBlswQpx YoXO2u1oIT0rJrLin0VunFrkgpusaO2p3iMPxakyyKZH8lPef+oT2p2TtF/9wulxeq L9L2Eau6nVV+PrbM1I55zfGJz78+QATj9yciWPCc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-64297: module: decompress: check return value of module_extend_max_pages() Date: Sat, 25 Jul 2026 10:48:34 +0200 Message-ID: <2026072506-CVE-2026-64297-5945@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=3491; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=r2LR2kKxiNN26idCkhlONjq+jXalCkVb/LTRruO0fxo=; b=owGbwMvMwCRo6H6F97bub03G02pJDFkpFW4hZySDZ3/cOefAVcMjfd5zisMXKgU2sK0O5BS3Z PG8pSrbEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABdxZ5inpzbtX9FVl8Nhbyed +3/gwB/G/UxHGObnmzX6d5Sxq0isOcWZwxjFZVct4QEA 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: module: decompress: check return value of module_extend_max_pages() module_extend_max_pages() calls kvrealloc() internally and returns -ENOMEM on allocation failure. The return value is never checked. If the initial allocation fails, info->pages remains NULL and info->max_pages remains 0. Subsequent calls to module_get_next_page() will attempt to dynamically grow the array by calling module_extend_max_pages(info, 0) since info->used_pages is 0. This results in kvrealloc(NULL, 0) returning ZERO_SIZE_PTR, which is treated as a success, leading to a dereference of ZERO_SIZE_PTR and a kernel oops. Fix: add the missing error check after module_extend_max_pages() and return immediately on failure. This matches the pattern used by every other kvrealloc() caller in the module loading path. [Sami: Corrected the analysis in the commit message.] The Linux kernel CVE team has assigned CVE-2026-64297 to this issue. Affected and fixed versions =========================== Issue introduced in 5.17 with commit b1ae6dc41eaaa98bb75671e0f3665bfda248c3e7 and fixed in 6.1.178 with commit e7f174715f9f0cbcb9e87b52e4fc4ef149baac98 Issue introduced in 5.17 with commit b1ae6dc41eaaa98bb75671e0f3665bfda248c3e7 and fixed in 6.6.145 with commit afcc0515bbdd28d509a2b5870faaa89b137f5d53 Issue introduced in 5.17 with commit b1ae6dc41eaaa98bb75671e0f3665bfda248c3e7 and fixed in 6.12.96 with commit 168072baf9ad516d5a06046514c7fea4c0671990 Issue introduced in 5.17 with commit b1ae6dc41eaaa98bb75671e0f3665bfda248c3e7 and fixed in 6.18.39 with commit a82e170637e050a803b4f37542371ef216bf66d2 Issue introduced in 5.17 with commit b1ae6dc41eaaa98bb75671e0f3665bfda248c3e7 and fixed in 7.1.4 with commit e7da02659c229f73492fb1ed87ceda4090153aaa Issue introduced in 5.17 with commit b1ae6dc41eaaa98bb75671e0f3665bfda248c3e7 and fixed in 7.2-rc1 with commit 786d2d84416a9a1c1a47b71a68d679d886284be2 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-64297 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: kernel/module/decompress.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/e7f174715f9f0cbcb9e87b52e4fc4ef149baac98 https://git.kernel.org/stable/c/afcc0515bbdd28d509a2b5870faaa89b137f5d53 https://git.kernel.org/stable/c/168072baf9ad516d5a06046514c7fea4c0671990 https://git.kernel.org/stable/c/a82e170637e050a803b4f37542371ef216bf66d2 https://git.kernel.org/stable/c/e7da02659c229f73492fb1ed87ceda4090153aaa https://git.kernel.org/stable/c/786d2d84416a9a1c1a47b71a68d679d886284be2