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 5D09B1ACECE for ; Sun, 19 Jan 2025 10:19:43 +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=1737281983; cv=none; b=WKyThoY39MPuaqzt37dA0ui7ajASXXdhLAitBOCfAQi5Z3gQsVBFeAFaEzZnUjUFW7uMr6PW8xIt0bFLWcEIwa1z+0tpkk/BvtiSO5540vSSI/Qgqc5m0K113k+qrgl6UdlYSnbIA7IAAwu98yQQ8N0U4kL2A/4n7aXcsz2yXKI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737281983; c=relaxed/simple; bh=KMSGH/D0UopzJBjO19Nn8fq+XGTAEbhqm3oS+tz3+J0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=U2gdTcrzwuoVSRX2MkT29bQT/ulozSlbIUXKimMSnH+CIzCQcVreECjhp9O0w45wCcjPcgafQFzvKS76vnF/Fu+l1Mm+YDpjTUJ1H79df9e7cLgbEsPR/Z2L07B6cHqaWydkQqBSTK6V0WM23mHjQMeXQYI6O+hmJmLkLYA/7go= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=f7in3rVA; 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="f7in3rVA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D362CC4CED6; Sun, 19 Jan 2025 10:19:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1737281983; bh=KMSGH/D0UopzJBjO19Nn8fq+XGTAEbhqm3oS+tz3+J0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=f7in3rVAzL4pOlHmwTflyxgxYlkbbel9N3WEp7j5cXib0My0kxBdZL5QDyrk/IEXE 1qtz5d/uyYE6Ll3pqbb5cy5qEyZsEBYutfCRmvI1sQdddw9EEt8SeVE4wpZfpsrw6w DAN7RqxIG2U7aetpbbHpwHLt8SuRYW6HC4wR7NLc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21650: net: hns3: fixed hclge_fetch_pf_reg accesses bar space out of bounds issue Date: Sun, 19 Jan 2025 11:17:59 +0100 Message-ID: <2025011946-CVE-2025-21650-3a74@gregkh> X-Mailer: git-send-email 2.48.1 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=3178; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=KMSGH/D0UopzJBjO19Nn8fq+XGTAEbhqm3oS+tz3+J0=; b=owGbwMvMwCRo6H6F97bub03G02pJDOk9F73WyzMtb1C9fUCGnyFNKuC9w6s/24Udir84pZhcy bdqtQ/piGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgIm8ZGJYMI9jdYJTsO8mqbW/ NqhPXT4l0E1RkWGuwP6P2sb+9U1ptu8X25/9cVxx5tnrAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: net: hns3: fixed hclge_fetch_pf_reg accesses bar space out of bounds issue The TQP BAR space is divided into two segments. TQPs 0-1023 and TQPs 1024-1279 are in different BAR space addresses. However, hclge_fetch_pf_reg does not distinguish the tqp space information when reading the tqp space information. When the number of TQPs is greater than 1024, access bar space overwriting occurs. The problem of different segments has been considered during the initialization of tqp.io_base. Therefore, tqp.io_base is directly used when the queue is read in hclge_fetch_pf_reg. The error message: Unable to handle kernel paging request at virtual address ffff800037200000 pc : hclge_fetch_pf_reg+0x138/0x250 [hclge] lr : hclge_get_regs+0x84/0x1d0 [hclge] Call trace: hclge_fetch_pf_reg+0x138/0x250 [hclge] hclge_get_regs+0x84/0x1d0 [hclge] hns3_get_regs+0x2c/0x50 [hns3] ethtool_get_regs+0xf4/0x270 dev_ethtool+0x674/0x8a0 dev_ioctl+0x270/0x36c sock_do_ioctl+0x110/0x2a0 sock_ioctl+0x2ac/0x530 __arm64_sys_ioctl+0xa8/0x100 invoke_syscall+0x4c/0x124 el0_svc_common.constprop.0+0x140/0x15c do_el0_svc+0x30/0xd0 el0_svc+0x1c/0x2c el0_sync_handler+0xb0/0xb4 el0_sync+0x168/0x180 The Linux kernel CVE team has assigned CVE-2025-21650 to this issue. Affected and fixed versions =========================== Issue introduced in 6.6 with commit 939ccd107ffcade20c9c7055a2e7ae0fd724fb72 and fixed in 6.12.10 with commit 0575baa733fc4219f230aef22d5bc35d922f1e9a Issue introduced in 6.6 with commit 939ccd107ffcade20c9c7055a2e7ae0fd724fb72 and fixed in 6.13-rc7 with commit 7997ddd46c54408bcba5e37fe18b4d832e45d4d4 Issue introduced in 6.4.16 with commit df34972a33d268a7113c119fe4e4b07a6819aa0c Issue introduced in 6.5.3 with commit 2b1fff96a297034f03466cfecda9824adafe16ed 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-21650 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: drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_regs.c drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_regs.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/0575baa733fc4219f230aef22d5bc35d922f1e9a https://git.kernel.org/stable/c/7997ddd46c54408bcba5e37fe18b4d832e45d4d4