Article View: linux.kernel.netdev
Article #16104Re: [PATCH net v2] virtio_net: check RX buffer length before DMA sync
From: patchwork-bot+netdevbpf
Date: Sat, 14 Nov 2026 00:50
Date: Sat, 14 Nov 2026 00:50
33 lines
9332 bytes
9332 bytes
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 10 Nov 2026 16:38:27 +0100 you wrote:
> An RX queue that uses the DMA API (rq->use_page_pool_dma, for example
> with VIRTIO_F_ACCESS_PLATFORM) syncs each received buffer with
> page_pool_dma_sync_for_cpu() using the length the device wrote to the
> used ring, and checks that length against the posted buffer only after
> the sync.
>
> With SWIOTLB bouncing (swiotlb=force, or a confidential-computing
> guest), the sync copies from the shared bounce buffer into the guest's
> private page, so an oversized length also copies the bytes the device
> wrote past the posted buffer over the neighbouring page pool fragments.
> The later check drops the packet, but the copy has already happened. A
> malicious device, such as a host the confidential guest does not
> trust, can overwrite guest kernel memory next to an RX buffer with
> bytes it chooses, which is enough to take an unprivileged guest
> process to root.
>
> [...]
Here is the summary with links:
- [net,v2] virtio_net: check RX buffer length before DMA sync
https://git.kernel.org/netdev/net/c/29dfa436bc48
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Technical Details
Message-ID:
<179461740627.1921910.2264840033885936833.git-patchwork-notify@kernel.org>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-363023-linux-kernel-netdev=dewy.ruReferences:
<20261110-b4-virtionet-rxlen-v2-1-6ec5aa0edf9f@dfb.sh>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-363023-linux-kernel-netdev=dewy.ru From: patchwork-bot+netdevbpf@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net v2] virtio_net: check RX buffer length before DMA sync Date: Sat, 14 Nov 2026 00:50:06 +0000 Organization: Usenet Network Message-ID: <179461740627.1921910.2264840033885936833.git-patchwork-notify@kernel.org> References: <20261110-b4-virtionet-rxlen-v2-1-6ec5aa0edf9f@dfb.sh> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="1481826"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:RjEOPpBJMBnShPEHUL47lFaSXLQ= sha256:GVmoWCEuEzvuBC8bMWnrGc/UXZGg3mSWyn+hNnPkc9g= sha1:VguIRQyTSdrrZLPOtdiqA03WjKw= sha256:mOuJS3xNuoDBh90PgnCG8wGOCf+/YdKZxt4SjHKHQmE= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 5DB5E114729; Sat, 14 Nov 2026 04:10:00 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.401 X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NCp5P8pt25eY; Sat, 14 Nov 2026 04:09:57 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-363023-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mail.dewy.ru (Postfix) with ESMTPS id 6BDC0114616; Sat, 14 Nov 2026 04:09:48 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sin.lore.kernel.org (Postfix) with ESMTP id 657F3145196; Sat, 14 Nov 2026 00:50:27 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1794617413; b=Oryzqi1ZsPrpmJo+AaGQwQn8O1P2hiN41mASzCnHNU2dOOSErMV8yer4vA8nu/rvNaP+ 2wYnpYfJEiOqdqN3iESYRkUnwE9ccaib5seoh54qTqHDMI7rOjh13SrUw/0IUNShZZfBg dV+ibLBZwVxEPcdWmBfGUsOPEOLLRs7awFLqetqGf5DT6Xm7dOUPGff9zEZux+6F0Jv86 kLNnK+78oam1fmeE9aauvhOEJAKytwmL0gmkmh7kZAFx3Gv0qQ6PajKKOIGoPSiT+3irz 5avFuxhj9rPoL9TuaOCMgtygYIXzbh9OQuYZSfVIJvUHlGoGewoHUvLTZ4zYjqEQJ7Q== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794617413; h=X-Original-To:Received:Received:DKIM-Signature:Received:Content-Type: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Transfer-Encoding:Subject:From:Message-Id:Date:References: In-Reply-To:To:Cc; bh=RV2WT/ax20xY4zHVO5Fo+VeAWkgRpjWTrwUTpYs4W74=; b=cE6o9xoel9XmlW1EmuEAd8CtUJ11BTPYKxU9fdka7+/3JzqPk0eAtYDzPCzV+nPX2chS ROL93ROdJajm9SRKPq2pi/+Wou9kKCtCTS5L6uylSJ22EdWrdWOf9nmZrGkg4Lg42q9lF Y32M6HgdZtdCGvEMF2M1AFFnW3sYmrV+kuBVVlrcw4Cw8kFQKTzLcaH/IvxqUSuzE6TaK y37UCUWRcNj4CbcYAM+GZYsob1NoiXKXHO1eiA3vj1at1uSLMQkqbm3QlDwPp7WwVK5P1 0sbKamX6xia0FSjghBDwrE/ip+5N/r5hSfmWu9fipRCxCuDDKuq52eSV+adNafes4Lw== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ljHD7OWy; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 99A48606A329; Sat, 14 Nov 2026 00:50:13 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ljHD7OWy X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794617407; b=BhZjbMnRaOyq/eMI8ntd1fzGo+Ui6WvTT+cjoSB2XColH98GtEI0I0A8+Vgbvbqt/ES2 5B99E/4FSnmvCvXnt55FQUQlAUOwLyLk6iPqnyz+OxzSaV7wLkHLd77AuhYcCeBk10ZRh 5Qsr4XqQZyaQA2gFi2HsNyGJoJxE6J2x0s+BzQLnVaeaYvleUFh0LmjFOjzrCV/hE2jtN GInisZZcAOUFi9jxdJ57CxopU/I3XXUK3oLTny7x8hrNMvMiBUIIHk6KfLAFvWsALY5uX 0ZoY42mOzUa9nMaH3h/o1upVE/GUWKn1XkOUJ2jTrHMF//fHo5a9htIk6J7QV2s8U1w== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794617407; h=Received:DKIM-Signature:Received:Content-Type:MIME-Version: Content-Transfer-Encoding:Subject:From:Message-Id:Date:References: In-Reply-To:To:Cc; bh=RV2WT/ax20xY4zHVO5Fo+VeAWkgRpjWTrwUTpYs4W74=; b=CyJOe+6dDWgwH83bwMGhApOglJ+1+xyFfEFBdsK84QAH5uV0ES0vhWerLmYFylyqUHeE HH9I7L4/O6cdtFMdqqO/8AxfzUHrOX7aLawxYkX29AE9+JRNLzuXWmxFjtCaFnT74SgP4 MhkvMzqVyjXRsEezrVgnMxL9mF5lKROE8469DQy2ejiefRDJJGCECelbaBcnxWkV/hqzs +pTjWRmcobe/YBXRGLlR03TjxQTa87O0g8iO63EbNgvWnherzFoK2RLw5B3yrg+0eyjb0 PsEL9aMtXAlIaW00nmXFuRJ71PAa6VXkpPyM5FKHcK0KbzZUma9c/lsugAGBxLwTa2Q== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ljHD7OWy; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B6EC9606A889; Sat, 14 Nov 2026 00:50:07 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 90D051F000C6; Sat, 14 Nov 2026 00:50:07 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1794617407; bh=RV2WT/ax20xY4zHVO5Fo+VeAWkgRpjWTrwUTpYs4W74=; h=Subject:From:Date:References:In-Reply-To:To:Cc; b=ljHD7OWyETYSKtGS8YYjTMQkDGjPZEMZpO8DCHFCXJNvg/eRSSgowhgROVGKE/22i TUdjL7hyeiTQ1qN1atqvhL/A3SYYcGtwxvC9gusQk3waVR9EKO+3tjUP1i9EEqEoiR h52zb/9FL70Ryehkc5h/LIJnvFpGoUxLPSEw0ycL3eMxSMOfy4Pf+RzOwNFq6m/G9j eQjEXQCzUSMZzpA0/+cjZRRNhNZvcg1wLZU6ZgtgNNlDzrkK//qmtUPsmFULeGLhB+ 4CxMc5twr1BKgo3XP6M0BrsDsNp9wfxdw0pbufotmfbrm3BrGa0LIcax6DI7xUfaaB awSIs1ySuxS5A== X-Received: from [10.30.226.235] (localhost [IPv6:::1]) by aws-us-west-2-korg-oddjob-rhel9-1.codeaurora.org (Postfix) with ESMTP id 8882B380821F; Sat, 14 Nov 2026 00:50:07 +0000 (UTC) X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-In-Reply-To: <20261110-b4-virtionet-rxlen-v2-1-6ec5aa0edf9f@dfb.sh> X-Cc: netdev@vger.kernel.org, mst@redhat.com, jasowangio@gmail.com, eperezma@redhat.com, xuanzhuo@linux.alibaba.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, vishs@meta.com, virtualization@lists.linux.dev, linux-kernel@vger.kernel.org, stable@vger.kernel.org, nikolai@kalinidze.me