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 0933C12D1FC for ; Fri, 24 May 2024 15:11:24 +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=1716563484; cv=none; b=YrvDS5EaBA2KF6c0xLCvy6V76NcQNSyOoxZ2dBSrKDh+f4RtnwAwJCFds/ZxK7DzUYUune4nrNMDXNpkX9Y8DuRqOOkKSFZiT/dpGakuCYmwmQDBDI7bUheJsqG1WIbJJjBwp+VsABFcLhegA+uvteFnApuZ1m/X1MbCJtHISsM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716563484; c=relaxed/simple; bh=NFlfOE+3QgUrznUu472jTap2CUJg/NQHbSpJzX0Mxow=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=gmtn3DP8zqNQBxXb286AwOYx1JoU+9dnhJYEAET5ReRMvQHuvKQWM1bGzsHmeUryKmjU69QEsnt8GevxkPZLhUZkO7efrrZ9LzJCgz8YshYlmN+zOdKiQy0itEfe5cAzbthIjF2lWJp3GHzW0/5htyVgudXuQB1dohe1c6/rWJ4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Pan5tO2X; 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="Pan5tO2X" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 845ADC4AF07; Fri, 24 May 2024 15:11:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716563483; bh=NFlfOE+3QgUrznUu472jTap2CUJg/NQHbSpJzX0Mxow=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Pan5tO2XsYMOKbsFODBXwmKg2ahNNmLth0YhC/6ZNgcFR7CVPOSQ0E6VeAjuApplB zDKJk6h5LLpBTq5fQP4c5bxZBbnqpnfL+ydJbo2/yVn8ektWOYnr3Ub0ZYTaa7OK0s txpurIc64RWOC4yC4n5UJKMdYJXC6rkRJsNWmjlo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47548: ethernet: hisilicon: hns: hns_dsaf_misc: fix a possible array overflow in hns_dsaf_ge_srst_by_port() Date: Fri, 24 May 2024 17:10:08 +0200 Message-ID: <2024052441-CVE-2021-47548-e9c0@gregkh> X-Mailer: git-send-email 2.45.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=2677; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=NFlfOE+3QgUrznUu472jTap2CUJg/NQHbSpJzX0Mxow=; b=owGbwMvMwCRo6H6F97bub03G02pJDGkBa7dqHF+r9fWQ8OW1R4917f20/Pn0Ro6aBVZNqz8vv va1gFMtsyOWhUGQiUFWTJHlyzaeo/srDil6GdqehpnDygQyhIGLUwAmwmDNMFdm2vSAkufbMljv nJfti7jy5a/SgjqGBSvK+48fcv5k5+O48M+zgvu+NzSqZAA= 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: ethernet: hisilicon: hns: hns_dsaf_misc: fix a possible array overflow in hns_dsaf_ge_srst_by_port() The if statement: if (port >= DSAF_GE_NUM) return; limits the value of port less than DSAF_GE_NUM (i.e., 8). However, if the value of port is 6 or 7, an array overflow could occur: port_rst_off = dsaf_dev->mac_cb[port]->port_rst_off; because the length of dsaf_dev->mac_cb is DSAF_MAX_PORT_NUM (i.e., 6). To fix this possible array overflow, we first check port and if it is greater than or equal to DSAF_MAX_PORT_NUM, the function returns. The Linux kernel CVE team has assigned CVE-2021-47548 to this issue. Affected and fixed versions =========================== Fixed in 4.9.292 with commit 948968f87476 Fixed in 4.14.257 with commit abbd5faa0748 Fixed in 4.19.220 with commit dd07f8971b81 Fixed in 5.4.164 with commit 99bb25cb6753 Fixed in 5.10.84 with commit 22519eff7df2 Fixed in 5.15.7 with commit fc7ffa7f10b9 Fixed in 5.16 with commit a66998e0fbf2 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-2021-47548 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/hns/hns_dsaf_misc.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/948968f8747650447c8f21c9fdba0e1973be040b https://git.kernel.org/stable/c/abbd5faa0748d0aa95d5191d56ff7a17a6275bd1 https://git.kernel.org/stable/c/dd07f8971b81ad98cc754b179b331b57f35aa1ff https://git.kernel.org/stable/c/99bb25cb6753beaf2c2bc37927c2ecc0ceff3f6d https://git.kernel.org/stable/c/22519eff7df2d88adcc2568d86046ce1e2b52803 https://git.kernel.org/stable/c/fc7ffa7f10b9454a86369405d9814bf141b30627 https://git.kernel.org/stable/c/a66998e0fbf213d47d02813b9679426129d0d114