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 B02072C1A2 for ; Wed, 28 Feb 2024 08:17:39 +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=1709108259; cv=none; b=VcrFBU4yykI4sEovo3Pr0K0Dx0vCqyyB0ih8yxzAJv18An9aaITyxEY6eD7PeDU6Kj40iRpHnTNRlefmwA317jDcCbiqWgWJCwzoXXOTWqxufa6WXCBA3xOsVIZZcqxOQ+nAY715Oo1ZTYrfINt0e1hZl2kpcX/56eY6/LsfbNo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709108259; c=relaxed/simple; bh=GsGjjjXTGJkkbijvcwI6c9RyZWhxHyy3ZJMDxR/WOxI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ONF+G7mVla2HPhjr1MkVviMhRlAYKIxy1tLfCCnVdPNovVYpcZvCtfV2zAql5qHb0RApc3C7Z7KhPKgUtJIzPsfNT6nzUlru0qleLsJT1Hjyo7ooxVnnArftTqdmiK567+qPs++rdSdnED8IhqP77NRtu/Wx1LK/iMHSAs22g/Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=2Qaqww9F; 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="2Qaqww9F" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3F5FBC433F1; Wed, 28 Feb 2024 08:17:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1709108259; bh=GsGjjjXTGJkkbijvcwI6c9RyZWhxHyy3ZJMDxR/WOxI=; h=From:To:Cc:Subject:Date:Reply-to:From; b=2Qaqww9FqEhbWOnrBoxEAXzXQBEppDpKjPDuJZypCx+jQo/zoKCa7YcV9XcjX4PUt QBh4vbpFlPdym/Nb7OpKcicouBC2FBSkIB2WerUMNNdoAWziMC8KVE7rgFg2Fs+xSg Z2wOXl04s7TU/bjxKkeJABO9RNAb259HMu1DWiDg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: gregkh@kernel.org Subject: CVE-2021-47036: udp: skip L4 aggregation for UDP tunnel packets Date: Wed, 28 Feb 2024 09:15:24 +0100 Message-ID: <2024022837-CVE-2021-47036-cd49@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=2787; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=/K0bzpOcLnWz1n1iFIrZKyhbulJQgGsZlp8Po5Oo6n4=; b=owGbwMvMwCRo6H6F97bub03G02pJDKn3XucW3zkUWdgayPhm2rWWZEYv6fdyZw56n8rZ73J04 /+gnbdLOmJYGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiP9cwzDjr4nJojhK/o7YU UytvxK17M6r2MSxYF2SmHHh00/femT4CJ460LXLWfrIAAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: gregkh@kernel.org Description =========== In the Linux kernel, the following vulnerability has been resolved: udp: skip L4 aggregation for UDP tunnel packets If NETIF_F_GRO_FRAGLIST or NETIF_F_GRO_UDP_FWD are enabled, and there are UDP tunnels available in the system, udp_gro_receive() could end-up doing L4 aggregation (either SKB_GSO_UDP_L4 or SKB_GSO_FRAGLIST) at the outer UDP tunnel level for packets effectively carrying and UDP tunnel header. That could cause inner protocol corruption. If e.g. the relevant packets carry a vxlan header, different vxlan ids will be ignored/ aggregated to the same GSO packet. Inner headers will be ignored, too, so that e.g. TCP over vxlan push packets will be held in the GRO engine till the next flush, etc. Just skip the SKB_GSO_UDP_L4 and SKB_GSO_FRAGLIST code path if the current packet could land in a UDP tunnel, and let udp_gro_receive() do GRO via udp_sk(sk)->gro_receive. The check implemented in this patch is broader than what is strictly needed, as the existing UDP tunnel could be e.g. configured on top of a different device: we could end-up skipping GRO at-all for some packets. Anyhow, that is a very thin corner case and covering it will add quite a bit of complexity. v1 -> v2: - hopefully clarify the commit message The Linux kernel CVE team has assigned CVE-2021-47036 to this issue. Affected and fixed versions =========================== Issue introduced in 5.6 with commit 36707061d6ba and fixed in 5.12.4 with commit 450687386cd1 Issue introduced in 5.6 with commit 36707061d6ba and fixed in 5.13 with commit 18f25dc39990 Please see https://www.kernel.org or 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-47036 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/ipv4/udp_offload.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/450687386cd16d081b58cd7a342acff370a96078 https://git.kernel.org/stable/c/18f25dc399901426dff61e676ba603ff52c666f7