From mboxrd@z Thu Jan 1 00:00:00 1970 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 1635912EBE8 for ; Tue, 21 May 2024 14:20:48 +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=1716301249; cv=none; b=Oz+baNVf4zIbbmgq2nX1NdCjL+g/TdHTlZg1E7IpBPy2NY8IfMr6jalk5LglpEMOWG6P4NHE0z9S3Sx1/MqGcitX6i5W7dU5DxomLfysYUGR1dOI0Sd/Q3P5gVJNGu8gK3Rfy6f4qirmDbuvC7FicNUHz0u0BNXL8KL+/QARzdk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716301249; c=relaxed/simple; bh=JEygRaIPgZQgU+WyjCGPU2oRirLeJAQ1zLKRL5WDHCg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=usRZz36mCydZx6S3NwpxJFQ2l418nIO/XKL1fOpBsNJV39qxBv8Tv/uO8m+PxwOz0yapbDuJXQ5ezWb8+tmSq6z921vel0DsxAiI727ejV4UN+xqEjhE4WyzEu9c1lCCNM6r/VLqpLF8Wl+jVah1iHnb9xBmQLLsI5VUARjKJpo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=SS4groYa; 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="SS4groYa" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4D165C32786; Tue, 21 May 2024 14:20:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716301248; bh=JEygRaIPgZQgU+WyjCGPU2oRirLeJAQ1zLKRL5WDHCg=; h=From:To:Cc:Subject:Date:Reply-to:From; b=SS4groYakyP+RJjFWkxfECbDYADIgrneFtWOzaS5Nd4rmPWQrALIvBQ6mPLx9Uuak xjLJ0ASsa9vuXaVab6UoFw2NVjcbL/Z37dOHfvoS49YCtVCqja0KYVA/WzW7ScZVlc 6wGcV4/i9dIoV4bgQpHcJIE2O/G5SOCsrlcecrXo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47223: net: bridge: fix vlan tunnel dst null pointer dereference Date: Tue, 21 May 2024 16:19:37 +0200 Message-ID: <2024052136-CVE-2021-47223-149e@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=3015; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=JEygRaIPgZQgU+WyjCGPU2oRirLeJAQ1zLKRL5WDHCg=; b=owGbwMvMwCRo6H6F97bub03G02pJDGk+ayveRPU2Odx2fHH8q/gSM8P3Tit/Vr2XYBCSk0tut a/JVz/ZEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABP5tpdhwe6/0d+UfsVoROhW dTyKevIo8rzbD4YFKytXWs/4k3e7qol/vu2kcpvrYqxdAA== 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: bridge: fix vlan tunnel dst null pointer dereference This patch fixes a tunnel_dst null pointer dereference due to lockless access in the tunnel egress path. When deleting a vlan tunnel the tunnel_dst pointer is set to NULL without waiting a grace period (i.e. while it's still usable) and packets egressing are dereferencing it without checking. Use READ/WRITE_ONCE to annotate the lockless use of tunnel_id, use RCU for accessing tunnel_dst and make sure it is read only once and checked in the egress path. The dst is already properly RCU protected so we don't need to do anything fancy than to make sure tunnel_id and tunnel_dst are read only once and checked in the egress path. The Linux kernel CVE team has assigned CVE-2021-47223 to this issue. Affected and fixed versions =========================== Issue introduced in 4.11 with commit 11538d039ac6 and fixed in 4.14.238 with commit ad7feefe7164 Issue introduced in 4.11 with commit 11538d039ac6 and fixed in 4.19.196 with commit 24a6e55f17aa Issue introduced in 4.11 with commit 11538d039ac6 and fixed in 5.4.128 with commit a2241e62f6b4 Issue introduced in 4.11 with commit 11538d039ac6 and fixed in 5.10.46 with commit fe0448a3fad3 Issue introduced in 4.11 with commit 11538d039ac6 and fixed in 5.12.13 with commit abb02e05cb1c Issue introduced in 4.11 with commit 11538d039ac6 and fixed in 5.13 with commit 58e2071742e3 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-47223 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/bridge/br_private.h net/bridge/br_vlan_tunnel.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/ad7feefe7164892db424c45687472db803d87f79 https://git.kernel.org/stable/c/24a6e55f17aa123bc1fc54b7d3c410b41bc16530 https://git.kernel.org/stable/c/a2241e62f6b4a774d8a92048fdf59c45f6c2fe5c https://git.kernel.org/stable/c/fe0448a3fad365a747283a00a1d1ad5e8d6675b7 https://git.kernel.org/stable/c/abb02e05cb1c0a30dd873a29f33bc092067dc35d https://git.kernel.org/stable/c/58e2071742e38f29f051b709a5cca014ba51166f