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 2F5232D63F1 for ; Fri, 4 Jul 2025 13:42:30 +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=1751636552; cv=none; b=gumrYcSCXJdc6eFn1gfRmd+t0qBpUVBDJ/40CaJnCqXNSVTZro04Rn3mGwXboBa3+ggPe1YZfJ2f7sRGdkAXhP8ZPnlh0m1i2K2fvj0LP+NsFZiBVB6PCJFeAUFLpyJZ3yIk/q5v7byon7ZiCfdFQ/sjLe4wnYhy/5KpZkSt0EI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751636552; c=relaxed/simple; bh=M2IPbJjXnnXL3emfBLy6JMk2YsPQjc4htz5Q8ZZYo68=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=C6OY4bbC34J6YMTFQbmhYbPJ5rY8475ZvuubvRJ8IDeNpgcqlBZJmWZV/03pd/VXzUBPlA/xpC6yREeXp2PYvX34dyCNjorGs1/oZ7ZJWDF200+EZb//uze7oMSIsnKNw3JD4iPimEB9uETfI/nudJanBB20/RDXD/tZSI44uvY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=wnKNpvas; 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="wnKNpvas" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E66DC4CEE3; Fri, 4 Jul 2025 13:42:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1751636550; bh=M2IPbJjXnnXL3emfBLy6JMk2YsPQjc4htz5Q8ZZYo68=; h=From:To:Cc:Subject:Date:Reply-to:From; b=wnKNpvas1a8ZIOYJfB2BAz/WVSaPaJ1XIUG8OSTRPbzpZ6/PPlReFn857XXDaKfNW 1ejQ4GS2y1RqvWfaom27oA02s0bVCXNzjrwGSI1WvEJA3SEtRAsOukPCRp7g8tuv7t DK2eek91rxZs3t+zvd1uwqh70onWExvkKN8ipWnQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38195: LoongArch: Fix panic caused by NULL-PMD in huge_pte_offset() Date: Fri, 4 Jul 2025 15:37:24 +0200 Message-ID: <2025070416-CVE-2025-38195-1f8b@gregkh> X-Mailer: git-send-email 2.50.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=3110; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=UwhBntvuhS1NDbdi0erXhUotMDh8dPhgks88m25ciY4=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnpN3k09jlfdXq5cPULvqxbH/oSNX7JGjlM5fun8zlr6 uTXXm7cHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRWfsY5hlNarkwK/zV9wt2 f9IEP6w8ELpi4Q6GeXbshSut3dUMgpyjOqOi2FM2frjBBgA= 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: LoongArch: Fix panic caused by NULL-PMD in huge_pte_offset() ERROR INFO: CPU 25 Unable to handle kernel paging request at virtual address 0x0 ... Call Trace: [<900000000023c30c>] huge_pte_offset+0x3c/0x58 [<900000000057fd4c>] hugetlb_follow_page_mask+0x74/0x438 [<900000000051fee8>] __get_user_pages+0xe0/0x4c8 [<9000000000522414>] faultin_page_range+0x84/0x380 [<9000000000564e8c>] madvise_vma_behavior+0x534/0xa48 [<900000000056689c>] do_madvise+0x1bc/0x3e8 [<9000000000566df4>] sys_madvise+0x24/0x38 [<90000000015b9e88>] do_syscall+0x78/0x98 [<9000000000221f18>] handle_syscall+0xb8/0x158 In some cases, pmd may be NULL and rely on NULL as the return value for processing, so it is necessary to determine this situation here. The Linux kernel CVE team has assigned CVE-2025-38195 to this issue. Affected and fixed versions =========================== Issue introduced in 6.6.89 with commit 2ca9380b12711afe95b3589bd82b59623b3c96b3 and fixed in 6.6.95 with commit b427d98d55217b53c88643579fbbd8a4c351a105 Issue introduced in 6.12.26 with commit 51424fd171cee6a33f01f7c66b8eb23ac42289d4 and fixed in 6.12.35 with commit 985f086f281b7bbb6644851e63af1a17ffff9277 Issue introduced in 6.15 with commit bd51834d1cf65a2c801295d230c220aeebf87a73 and fixed in 6.15.4 with commit b5c7397b7fd125203c60b59860c168ee92291272 Issue introduced in 6.15 with commit bd51834d1cf65a2c801295d230c220aeebf87a73 and fixed in 6.16-rc1 with commit ee084fa96123ede8b0563a1b5a9b23adc43cd50d Issue introduced in 6.1.136 with commit 34256805720993e37adf6127371a1265aea8376a Issue introduced in 6.14.5 with commit b49f085cd671addbda4802d6b9382513f7dd0f30 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-38195 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: arch/loongarch/mm/hugetlbpage.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/b427d98d55217b53c88643579fbbd8a4c351a105 https://git.kernel.org/stable/c/985f086f281b7bbb6644851e63af1a17ffff9277 https://git.kernel.org/stable/c/b5c7397b7fd125203c60b59860c168ee92291272 https://git.kernel.org/stable/c/ee084fa96123ede8b0563a1b5a9b23adc43cd50d