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 73E8C12D74E for ; Fri, 24 May 2024 15:10:57 +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=1716563457; cv=none; b=V0BwJ27jgF791MvLFq4U2rVJtK4Fun4w3in9yRKd5gltQFP7/KnXhbtOq35UMe8AMOaJSRnX716TNg2fGC+q5BVTfyl7SEH7Hv9jGtGOpgRnNly74qj0TP0QAt8jSkNGNFgsPkadAQv/EDRA4t6RGtg72+3P5aHmtDBBNf/VTBU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716563457; c=relaxed/simple; bh=UFc7D725sLYXAXacMx6DA3SetetPNWPRfhXDsCx5zMw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=vFgmrNiOB59NWUPVX3ZY2xhz/3RO/0Nkn2y3iIXTC299Fp5lwpRGC/FYCVyIPf/JLvEduaEQxFnqqdjWtxOCZSuzdhtu4ApZfS7qECV7mmpmZRtHt4GNIXUnDH99xuwDIakyYMQLLyjmNwz4IPtkYFg5YiIJCdJg9Akf+zO6Q7w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=yeSj1y2b; 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="yeSj1y2b" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EFBFFC2BBFC; Fri, 24 May 2024 15:10:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716563457; bh=UFc7D725sLYXAXacMx6DA3SetetPNWPRfhXDsCx5zMw=; h=From:To:Cc:Subject:Date:Reply-to:From; b=yeSj1y2byW8SAGjkWp9xF9VdUuqO7SwAANf/rLUVHM2o+JrIqdvaYatA1tuE7h6jX 69ObpmkXzNCJ7IQ0Im0s0YUDyyPGbqIeWNw13dznsFXZMSV+nRaKBQhT2/SW2BA3nY GlrUdVeyqAdBf0ytliFdfsP71HHIY7na2Z90ofGI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47514: devlink: fix netns refcount leak in devlink_nl_cmd_reload() Date: Fri, 24 May 2024 17:09:34 +0200 Message-ID: <2024052431-CVE-2021-47514-9975@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=2098; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=UFc7D725sLYXAXacMx6DA3SetetPNWPRfhXDsCx5zMw=; b=owGbwMvMwCRo6H6F97bub03G02pJDGkBa1df6hONXsi65gUjw0bDxQ7JdbZ7zn+q7lTNO2S31 pzhBW9ZRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExkzRuGBVPfvvtmdVF1XtXZ +Uu6nb1LVgq+OMkwV+h6iqio3VZnJX9z+Zxny1PmWmd9BAA= 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: devlink: fix netns refcount leak in devlink_nl_cmd_reload() While preparing my patch series adding netns refcount tracking, I spotted bugs in devlink_nl_cmd_reload() Some error paths forgot to release a refcount on a netns. To fix this, we can reduce the scope of get_net()/put_net() section around the call to devlink_reload(). The Linux kernel CVE team has assigned CVE-2021-47514 to this issue. Affected and fixed versions =========================== Issue introduced in 5.10 with commit ccdf07219da6 and fixed in 5.10.85 with commit 4b7e90672af8 Issue introduced in 5.10 with commit ccdf07219da6 and fixed in 5.15.8 with commit fe30b70ca84d Issue introduced in 5.10 with commit ccdf07219da6 and fixed in 5.16 with commit 4dbb0dad8e63 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-47514 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: net/core/devlink.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/4b7e90672af8e0c78205db006f1b0a20ebd07f5f https://git.kernel.org/stable/c/fe30b70ca84da9c4aca85c03ad86e7a9b89c5ded https://git.kernel.org/stable/c/4dbb0dad8e63fcd0b5a117c2861d2abe7ff5f186