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 4D3D61E6DC5 for ; Tue, 1 Apr 2025 15:47:19 +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=1743522440; cv=none; b=kvPBBDUch/O0SlFjYhdf3WyLI9scos3R4g62jmR6CFs7oqfz71JyO7ik8I11NU6toxcKj/fBw2LDpdWHGQJQH1/Cn474Hh2C07Y0fliIDZL08y4hj/JpGF8v4WzNkDHCwkyotmfCQaBnBJM8fYUIiVMKv2iGhoCZDepPhpissjQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743522440; c=relaxed/simple; bh=1G18iFv6hCcn99QnAR44ChIKZQkzFCllLAgFUdBokYM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Sb/pfhR6QvVHKceg6adlWgyq/HgKwTAsGCdqyDtb9c9ascKfacuXOfpVivCwFe1YLD4CNufzoTKfLMdJLPxdbVzLgEPeTneOY9PjGLKMRON0c4arviPKyPogSVeP93tsAhEWW+gfTYPDHTWoHIqtlkRofQZzFY6uWszQaVztjtw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=US9cECy4; 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="US9cECy4" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E17FC4CEE4; Tue, 1 Apr 2025 15:47:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1743522439; bh=1G18iFv6hCcn99QnAR44ChIKZQkzFCllLAgFUdBokYM=; h=From:To:Cc:Subject:Date:Reply-to:From; b=US9cECy4eG+8lzY7b8xbI0nSQVb10d3ta5xVSYXuNl64d0DkFRRqfCBhWKrvFKMeh 84wuOnFo4E0hiB+vcl+gGi7C3reT5d48qaiRWupxSK9xrbEt4tuP4smL/e9nE/uez8 23UPRsCNNR1SFUjpRjQ338oOBO8EAdcaVF6bjaho= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21954: netmem: prevent TX of unreadable skbs Date: Tue, 1 Apr 2025 16:45:39 +0100 Message-ID: <2025040143-CVE-2025-21954-8f0d@gregkh> X-Mailer: git-send-email 2.49.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=2667; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=1G18iFv6hCcn99QnAR44ChIKZQkzFCllLAgFUdBokYM=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlvuNSXRQbdn1DYvO1K6drVPXNy7k/vFn9hkSR4xPbP+ S0PFq7e2RHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATEUhjWNBR9u5Vl32DB8/3 U71rsw+/8k0OvcIwP6Ns8gfDyFsTrLy8jk94tPzpY3MtEQA= 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: netmem: prevent TX of unreadable skbs Currently on stable trees we have support for netmem/devmem RX but not TX. It is not safe to forward/redirect an RX unreadable netmem packet into the device's TX path, as the device may call dma-mapping APIs on dma addrs that should not be passed to it. Fix this by preventing the xmit of unreadable skbs. Tested by configuring tc redirect: sudo tc qdisc add dev eth1 ingress sudo tc filter add dev eth1 ingress protocol ip prio 1 flower ip_proto \ tcp src_ip 192.168.1.12 action mirred egress redirect dev eth1 Before, I see unreadable skbs in the driver's TX path passed to dma mapping APIs. After, I don't see unreadable skbs in the driver's TX path passed to dma mapping APIs. The Linux kernel CVE team has assigned CVE-2025-21954 to this issue. Affected and fixed versions =========================== Issue introduced in 6.12 with commit 65249feb6b3df9e17bab5911ee56fa7b0971e231 and fixed in 6.12.20 with commit 454825019d2f0c59e5174ece9e713f45ad80beff Issue introduced in 6.12 with commit 65249feb6b3df9e17bab5911ee56fa7b0971e231 and fixed in 6.13.8 with commit 1c17c8ced25c5fbe424c7ad7ea11d33014a986b1 Issue introduced in 6.12 with commit 65249feb6b3df9e17bab5911ee56fa7b0971e231 and fixed in 6.14 with commit f3600c867c99a2cc8038680ecf211089c50e7971 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-2025-21954 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/dev.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/454825019d2f0c59e5174ece9e713f45ad80beff https://git.kernel.org/stable/c/1c17c8ced25c5fbe424c7ad7ea11d33014a986b1 https://git.kernel.org/stable/c/f3600c867c99a2cc8038680ecf211089c50e7971