Article View: linux.kernel.netdev
Article #6677Re: [PATCH net-next 04/15] net: skbuff: fail segmentation when a segment can't be checksummed
From: netdev-bot+sashiko
Date: Fri, 23 Oct 2026 04:52
Date: Fri, 23 Oct 2026 04:52
60 lines
10460 bytes
10460 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The commit fixes a real, user-visible TX bug but has no Fixes:
tag (and no Cc: stable).
--
net: skbuff: fail segmentation when a segment can't be checksummed
This patch changes the sg && !csum software checksum path in
skb_segment() to use skb_checksum_full(). The segmentation now fails with
-EFAULT when a segment can't be checksummed. This covers devmem TCP skbs
whose payload is in unreadable frags: skb_checksum() used to warn and
return 0, so the TCP checksum didn't cover the payload.
Link: https://lore.kernel.org/all/20261009-b4-skb-segment-nosg-unreadable-v1-1-7e2334a55fe8@toxicpanda.com/
> Found by the Sashiko AI review of an earlier fix for the same path with
> SG off.
>
> Link: https://lore.kernel.org/all/20261009-b4-skb-segment-nosg-unreadable-v1-1-7e2334a55fe8@toxicpanda.com/
> Assisted-by: LLM
> Signed-off-by: Josef Bacik <josef@toxicpanda.com>
[Severity: Low]
Should this have a Fixes: tag, and possibly Cc: stable?
Before this patch, the perform_csum_check branch of skb_segment() called
skb_checksum() on segments that share the devmem skb's net_iov frags.
zerocopy_fill_skb_from_devmem() in net/core/datagram.c never sets
SKBFL_SHARED_FRAG, so the __skb_linearize() fallback is skipped and
__skb_checksum() ends up here:
if (WARN_ON_ONCE(!skb_frags_readable(skb)))
return 0;
That WARN is fatal with panic_on_warn. tcp_gso_segment() then writes a
TCP checksum that doesn't cover the payload that goes out.
This path became reachable when unreadable-frag TX skbs were added by:
bd61848900bf ("net: devmem: Implement TX path")
That looks like the right Fixes: target. Another patch in this series,
"net: skbuff: fail checksum validation when the skb can't be checksummed",
does carry a Fixes: tag. Without one here, the stable tooling won't pick
up this fix.
This patch also calls skb_checksum_full(), which is added by the earlier
patch in this series, "net: skbuff: add skb_checksum_full() that reports
failure". Could the commit message mention that dependency, so a backport
takes both patches?
--
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261019-b4-skbuff-bug-on-followups-v1-0-41dbef50b9f7%40toxicpanda.com
Technical Details
Message-ID:
<179273112116.3134.13075947496257634766@kernel.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-350906-linux-kernel-netdev=dewy.ruReferences:
<20261019-b4-skbuff-bug-on-followups-v1-4-41dbef50b9f7@toxicpanda.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-350906-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next 04/15] net: skbuff: fail segmentation when a segment can't be checksummed Date: Fri, 23 Oct 2026 04:52:01 +0000 Organization: Usenet Network Message-ID: <179273112116.3134.13075947496257634766@kernel.org> References: <20261019-b4-skbuff-bug-on-followups-v1-4-41dbef50b9f7@toxicpanda.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="412412"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:Y1ajZN0haevyZduYktK73atdTM4= sha256:4EtWUBnQBlrbylfF6nPsqVIMBhedlbjPlv6WEyHkmKo= sha1:4KACh6KfWDPpQGSayqoJ7W0sRls= sha256:SWMSZXyqv7sBY39en/PuTEkT/vc1ip95dqPJ5cf9Oxk= 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 896BD1113E2; Fri, 23 Oct 2026 07:54:36 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.738 X-Spam-Status: No, score=-3.738 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.339, 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, URIBL_BLOCKED=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 RPGDw2VSAqV2; Fri, 23 Oct 2026 07:54:33 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-350906-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id 0C3BF1113DC; Fri, 23 Oct 2026 07:54:24 +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 C3F993553E; Fri, 23 Oct 2026 04:52:12 +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=1792731128; b=ZPNt+W5VGhrglJVs0AgmYU+AR8i07A9NxL+c8OhKn+Ld3ATi+J+6LQDKkh/MRj3kLj07 oKWjOT/qzsr/QIlUdRBdr5vhdU02r4NFnK8w5hT5MbrlR9Kw6YsHxCXWxFoNcIUfT+SjQ 7wMC4CjiGFOrU68sexwQY4lyMf0Zck4IoaLskd/zK8dfs5TwLEQkvtAmn9S5khIx3/plL VySEd8PwXm8hbGuftZBOEU9EN8JLmmNgqzZekyW5v+SPqND99HXDbPNX/VwCQ1LgBfAuM d5LR3xJXhYHm9ERwVOgBvk913zaFTJYajwic3vlO41Mqurfq6gXf5PCg82dGP/ZDFaQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792731128; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=BoB/A1sIi/INkgoVC9AAFNKr7YKhQUbQ+JtYOmccKaE=; b=BMmg/2ly+MIcxUTTAIo7+qhH/mKFpxlo/ZPx6oJOemIwqbx3x0BNrx76dsl0KBHQgBBo SXjDK5OeBVt7P1trgt7bkBwkUhjWjo6Qjiigz4lKJkb5MI2CX5DuFPMT1MuqlUoMOVNvR vk8lo9s9a4x5lOPL9kPASYHCtoaNQxBL6RmfATyOuwXVN/LXeqQXq2VfTGK3uzibQ4lGs OEHOZg4CG7MJ92YCIuqBWVM5rq9HUYd1XEr0IEnjqLHDVKEt56Rvhtk6R0YTdlrRW0S24 C4W8PLnKJnBxAOwla5t1y9FOFf9Z4Ira99qcp6PfHyBydwAVhXR4sssM61IJj4V7MBg== 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=ha4V+Px4; 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 CCC5260A2602; Fri, 23 Oct 2026 04:52:08 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=ha4V+Px4 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=1792731123; b=UDCw9+xVWZpZs2ZEc+WvVDZmdaw5mQ80eV8gLZHcFRwGP7FVLQs2rY2kHLU2sXWiyn8b LOIz/ALd7Jij/rPT56epDgIZ84rxO66WsOFL00RwLXxGTOMcX/ZiW/l2rkqr+odx9u97u uwwLQp2fr0Oz7xraTMuCoLjmfn+AhABTmHaELZtD1yQ4PF5CVYlBAIJetSReQhpB93ruE pMmvj9fiPjjcRorXDlHoHJLHqBdrZPWyy2spfn6MG8Ec4yIwF9Pz1f9KDvxUANvGLNrtV beEhL7WSadF+aIUzTk+tNCE9TtHF8ppBpusPHkyk+Loi37akFbXhD8ot4E0WqKoZg0g== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792731123; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=BoB/A1sIi/INkgoVC9AAFNKr7YKhQUbQ+JtYOmccKaE=; b=AnA8aD5zMAHDJTxdTuDwAkrr26lUOM6vZ4sG3hbSI7Ll31HIagBIZmolJzCKE8Zp4VRl tW4qxRGfvI7y82Iv44RR6bQl+Xs9Ya6+nx6pwbBOmQERfLvuV4tH5UPWE4XdTtE7nD7Wc sLkpN/xd9VW/kRWeRYB7WKZ9oVUtor83KMgoxtXirKkwDRzHanBqZLoySsHSh+7QNnutO gFDJ/UPZ470bVV6oGueh1I3DaW/6imcfTDU7tV8RekVjJnz2jnblEWi6YwVsmS/MQ9pOu MDC1cbMDwNF1ZGP6PdKBSAp50jPEpq2oS9y57Om20qV2GAUryFb+Zds3m4HkRGv0Jbw== 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=ha4V+Px4; 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 B1CA1606A324 for <netdev@vger.kernel.org>; Fri, 23 Oct 2026 04:52:02 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id A92E71F01825; Fri, 23 Oct 2026 04:52:01 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1792731122; bh=BoB/A1sIi/INkgoVC9AAFNKr7YKhQUbQ+JtYOmccKaE=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=ha4V+Px40uunuItMDirEmvN1G4w/6nhYdHlSNLpf8paKd/rUtTd+wHcsWbIWeh3GD LKrDwytd64GaIIfsmbD/j/9gf7BHplAqBgp3l/kTDVED007liwV2WGOermBWF5qfcO tLGgQLX1Y6A8QeXHVR2/tSCuONL96UW/Bjn/xiiVoz4Y4Kd/gnKCPhA0T96Io5fZu5 KqK5I2Zbhb6R/KGZKRp/We9eIpPMEBdMj1glD5VbZUY7eRcxsXRAOmp8cPanCmDJsJ SErKFtysFh+XDSmW/y5rDCe2OyDG+E5MBzBUz2TRTWAg+64uso+iw/+/rBv+IQDT7j N/2qfuwKE/wyg== X-Cc: davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, andrew+netdev@lunn.ch, jgross@suse.com, sstabellini@kernel.org, willemdebruijn.kernel@gmail.com, fmancera@suse.de, almasrymina@google.com, david.laight.linux@gmail.com, netdev@vger.kernel.org, xen-devel@lists.xenproject.org X-In-Reply-To: <20261019-b4-skbuff-bug-on-followups-v1-4-41dbef50b9f7@toxicpanda.com> X-sashiko-severity: Low 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