Article View: linux.kernel.netdev
Article #26090[PATCH RFC net v10 0/6] more virtio-net csum hardening
From: Showta Ishizaki
Date: Thu, 03 Dec 2026 01:53
Date: Thu, 03 Dec 2026 01:53
54 lines
9747 bytes
9747 bytes
Michael's series again, now v10. Patches 1-4 and 6 are his; patch 5 is mine. The only change since v9 is in patch 5. Changes since v9: - Patch 5: the non-GSO fallback summed skb->len - outer_th for the outer UDP checksum, which also covers trailing Ethernet padding, so a frame with non-zero padding got a wrong outer checksum. Sum uh->len instead, bounded so a length from the frame cannot over-read. Chris Arges found this in testing and sent the fix. The two issues Michael listed as open in v7 are still open, hence the RFC: the inner packet of a tunnel can have a valid header at inner_nh_offset that overlaps the real transport header, and completing the checksum at input breaks nf/BPF programs that edit the payload and rely on CHECKSUM_PARTIAL. Patches 1-4 and 6 are unchanged from v9 and were tested as described there. For patch 5 I sent, through a tap bridged to a tap with no offloads, a non-GSO UDP tunnel frame whose inner checksum is completed in software (an inner more-fragments bit) with non-zero Ethernet padding; without the fix the outer UDP checksum comes out wrong for both a v4 and a v6 outer, with it they verify. Based on net e6474ead54b8, the same base as v9; it also applies to current net (c1c39137dcc3). Michael S. Tsirkin (5): net: account for ingress-resolved virtio net hdr state um: vector: trim skbs before verifying the header virtio_net: parse tunnel csum_start little-endian net: resolve uncommon partial checksums at ingress net: add a sysctl to opt out of virtio net hdr checksum validation Showta Ishizaki (1): net: virtio: compute the outer checksum of non-GSO tunnel packets Documentation/admin-guide/sysctl/net.rst | 19 ++ arch/um/drivers/vector_kern.c | 6 +- arch/um/drivers/vector_transports.c | 4 +- drivers/net/tap.c | 4 +- drivers/net/tun.c | 44 +++- drivers/net/tun_vnet.h | 4 +- drivers/net/virtio_net.c | 2 +- include/linux/virtio_net.h | 263 ++++++++++++++++++++++- include/net/netns/core.h | 1 + net/core/dev.c | 7 + net/core/net_namespace.c | 1 + net/core/sysctl_net_core.c | 50 +++++ net/packet/af_packet.c | 21 +- 13 files changed, 402 insertions(+), 24 deletions(-) base-commit: e6474ead54b8acecb8b0462dde2d77f46d2b7dc1 -- 2.54.0 (Apple Git-157)
Technical Details
Message-ID:
<20261203.rfcv10.52108.0.zakinko@snowrabbit.org>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376198-linux-kernel-netdev=dewy.ruShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu.MISMATCH!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376198-linux-kernel-netdev=dewy.ru From: zakinko@snowrabbit.org (Showta Ishizaki) Newsgroups: linux.kernel.netdev Subject: [PATCH RFC net v10 0/6] more virtio-net csum hardening Date: Thu, 03 Dec 2026 10:53:19 +0900 Organization: Usenet Network Message-ID: <20261203.rfcv10.52108.0.zakinko@snowrabbit.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2108849"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:H4hBrC9s16nz9UsnErI1oUAfbic= sha256:JSGs/x+xO2XhmUCFpR8+IcwlPwM/cBpRYKZDNJev/vM= sha1:L6RU3CpniTJ9PVmW7Cs4fiFzUMg= sha256:h+qedp/Tz+sR+TnlANlPFZM/py6roL+GATfA62d8ML0= 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 2DBFD1177E5; Thu, 3 Dec 2026 04:54:54 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.051 X-Spam-Status: No, score=-3.051 tagged_above=-9999 required=6.31 tests=[HEADER_FROM_DIFFERENT_DOMAINS=0.249, 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-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 N7YxA68a9v79; Thu, 3 Dec 2026 04:54:49 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-376198-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=snowrabbit.org X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id BA0221177E1; Thu, 3 Dec 2026 04:54:36 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id E638D27F6E; Thu, 3 Dec 2026 01:54:34 +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=1796262874; b=MnJ2+RpXHHJ0tuG7oGx68WDxBmI5Ipwbun0xX+rc/QNJnwlVpZ3ot19TUTB/f70FKayO 2GRAd9+EzVLM8Fpizo0r1h/eh0v63xgQ2m+lYysW88uneNqrhi4VtCHpVldgFEyJmeXjD te0FG1a3C10t6cNM6X9lfsgdJiIsB+2SNSwTUFsyFJPtlSylISj1zWgmyIhs/CT2zS2e3 irZpo9/I6cyB8mwPRbEcwvWQl8wbTV64WERGhhbbnehHeLvxeUmcnoTfqRmMIHaaAgYMx ox6elN23B61RRxdOL2O5CmtDnmFtegturedJeCq9aeoSI9vtySY4ijZ549x1MfpZvwA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796262874; h=X-Original-To:Received:DMARC-Filter:Received:From:To:Cc:Subject:Date: Message-ID:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=StpfUQ8phXbVcIsPIi/7I+q/26/xbol3Ihj2ooaoOWM=; b=bzZ6MJmG2qbEy3a87Ceg6hYMaVBgnFTwg7KzrNAtrLtQeAs18Iy704f7RFI7nszvU/Bl lKfVLgF2ulhbbSOpwANUS43yiHG+q0oeJhvBjZCLZERqJ7b7bEthVhf8ujpFeX+ECm5O3 DaOUibqCmCYeN6d4x8drOO8RcnQ4XxwF/McI4NdVgjPThdHbjfUfXD9z7IFwv6JHrv9/5 hpUleZAzfWsh98Z4NTCkOHfrzFhyQZ9sr4cgh+vFh56G0BWFKq5z2h0GqD5zxhHNYktxO twvjdsHgf1uLWMFyTsHWY1hgJciX4wjCU/ahuNo0iSuL0ALGKeoUCyB5EgTq2Cn6u9g== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none header.from=snowrabbit.org; spf=pass smtp.mailfrom=snowrabbit.org; 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 B2094606A334; Thu, 3 Dec 2026 01:54:34 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=182.48.54.220 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796262869; b=agefWhocoLC8t/mJAYddIXWtdhXNTzvughQ2RVSLVu7PuIGInngredk6D2tYIGdiCfAg nMA5JJNn/q9K4Bvl2h0v+MQF1HzXu9Uj+X2qp/yejlLT/S77GCYaduzXP6KUGSdL8D2ZF l97q4xekCHmvtUJSGJztvorTzMWCWWrblbcaTDQiVIerMqq8VF8WapLy2E5ryNmayGXP4 V7GAIsmI86yzO6aId19Xg7h6PSsgvxTpX58rF/zyJIvkiOXGfvQyTtLfPZRMt3JdJTrXC Eme7eaooeJ98x2hIVdi3uKKkXShg7XI6ByMfm33hfpcMkso++bPyhjNtdj4J/OJNx9A== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796262869; h=DMARC-Filter:Received:From:To:Cc:Subject:Date:Message-ID: MIME-Version:Content-Type:Content-Transfer-Encoding; bh=StpfUQ8phXbVcIsPIi/7I+q/26/xbol3Ihj2ooaoOWM=; b=UQ4RMOwGzXCZ9PjsKWGqEFg8MbmT1Uo7OkETEzHYfMXWMZyTlN9Jwyi4O1nbTqVlGNoB AJFSBEtCugegDeHC901f3woUf5cM0WgPEYQPna6ky43h2bA0R8vxwRXRcbKaRvTiP7XgE GjJciE2wxbf4FxbjXzvCdHqBqjqXFJy8RnJqCfPQyUv/SSho48ctnY1sgYyvAHKgFCa7f dZzWNTq4p+yVz5KHb3uIuormiG3YnhRnBDuNi3YVxhFDMGs0g8rkeq5RwwVxTFWzuxCk2 2Sq/Y4BjGoDF76X9glg4+LcgSpNgnpvGK+UDXHwTtC3XlZrBuq7J0QdXEkpOavTTaTQ== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=snowrabbit.org; spf=pass smtp.mailfrom=snowrabbit.org; arc=none smtp.remote-ip=182.48.54.220 X-Received: from bambi.snowrabbit.org (bambi.snowrabbit.org [182.48.54.220]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 043E1606A322; Thu, 3 Dec 2026 01:54:27 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 043E1606A322 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=snowrabbit.org X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=snowrabbit.org X-Received: by bambi.snowrabbit.org (Postfix, from userid 3001) id 2FEB9C92FC; Thu, 3 Dec 2026 10:54:27 +0900 (JST) X-Cc: Eric Dumazet <edumazet@kernel.org>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, David S. Miller <davem@davemloft.net>, Andrew Lunn <andrew+netdev@lunn.ch>, Simon Horman <horms@kernel.org>, Eugenio Pérez <eperezma@redhat.com>, Xuan Zhuo <xuanzhuo@linux.alibaba.com>, Richard Weinberger <richard@nod.at>, Anton Ivanov <anton.ivanov@cambridgegreys.com>, Johannes Berg <johannes@sipsolutions.net>, Jonathan Corbet <corbet@lwn.net>, Shuah Khan <skhan@linuxfoundation.org>, Randy Dunlap <rdunlap@infradead.org>, Chris Arges <carges@cloudflare.com>, Paulos Yibelo <habte.yibelo@gmail.com>, Björn Töpel <bjorn@kernel.org>, virtualization@lists.linux.dev, linux-um@lists.infradead.org, linux-doc@vger.kernel.org, Showta Ishizaki <zakinko@snowrabbit.org> 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