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 BF68617BB3D for ; Mon, 25 Mar 2024 09:16: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=1711358203; cv=none; b=Mbry0ULxKEGxLPhBKervBct06Wm6drVUEDqlG42UZGLFF4bg6qtGnv6b93pUjEFbwH/lym+UVYcWXZfqIxQM/V++bQf2k1KHuzum0+SdnRGPK/cSkapWDmZUA8lphr8n8ikdYjjLpbQUNv79M5R71ssO7cC6weEFQPTvm5OGQDY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711358203; c=relaxed/simple; bh=Kh8ZW2tI4YlorcRGlstWkrjBi/SjDOQaDLJC/snHmUk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=aKM39CcQE8xDzQryFrcCd+7XUjI9d/uHqdbbr28F4vUBaVGLyUlr4kR34jMVM8FqvfXG75sJa8SaDd+w3YTj1QWJP7S/sxrPbBik1VDYqzEOtJJ449h4r4+v8P7zSdaGA+SkvfY/Hulcqolam/H77z0h+X0pV+Yks2LcmOW6Md4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ggX1am60; 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="ggX1am60" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC8D3C433F1; Mon, 25 Mar 2024 09:16:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1711358203; bh=Kh8ZW2tI4YlorcRGlstWkrjBi/SjDOQaDLJC/snHmUk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=ggX1am60Keb546TVqH/Zw0V+5dsxSM4/zKowAWpd79K2sOj148C2EUtVuu/nT1kSL vE4W6RZc+JJi2UBcW7iVTRJ/M2Zb8Kls7Qfv6+QNQqkcfzmXCrLSPWCmeiI0JkAxTv K5EaDuyr8fBtlywUu+wKV8QmTLvO7FgfeIQQU+fM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47158: net: dsa: sja1105: add error handling in sja1105_setup() Date: Mon, 25 Mar 2024 10:16:34 +0100 Message-ID: <2024032533-CVE-2021-47158-71e9@gregkh> X-Mailer: git-send-email 2.44.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=2031; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Kh8ZW2tI4YlorcRGlstWkrjBi/SjDOQaDLJC/snHmUk=; b=owGbwMvMwCRo6H6F97bub03G02pJDGmMDh8vp1bvFeJMdU38ecBVzT/v7yyGd7H1V/ee0EnWa spMdmLriGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgIlELWFYsGoN+yWrkFcvgqPZ GOYUukXuS5DewjDPbj+3055ksfUOR0/3qLpJvJB9ds4EAA== 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: dsa: sja1105: add error handling in sja1105_setup() If any of sja1105_static_config_load(), sja1105_clocking_setup() or sja1105_devlink_setup() fails, we can't just return in the middle of sja1105_setup() or memory will leak. Add a cleanup path. The Linux kernel CVE team has assigned CVE-2021-47158 to this issue. Affected and fixed versions =========================== Issue introduced in 5.2 with commit 8aa9ebccae87 and fixed in 5.10.42 with commit dd8609f20344 Issue introduced in 5.2 with commit 8aa9ebccae87 and fixed in 5.12.9 with commit 987e4ab8b8a4 Issue introduced in 5.2 with commit 8aa9ebccae87 and fixed in 5.13 with commit cec279a898a3 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-47158 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/dsa/sja1105/sja1105_main.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/dd8609f203448ca6d58ae71461208b3f6b0329b0 https://git.kernel.org/stable/c/987e4ab8b8a4fcbf783069e03e7524cd39ffd563 https://git.kernel.org/stable/c/cec279a898a3b004411682f212215ccaea1cd0fb