Article View: linux.kernel.netdev
Article #6684Re: [PATCH net-next 11/15] net: skbuff: refuse to segment a nested frag_list
From: netdev-bot+sashiko
Date: Fri, 23 Oct 2026 04:52
Date: Fri, 23 Oct 2026 04:52
61 lines
10103 bytes
10103 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 message for "net: skbuff: refuse to segment a nested
frag_list" says "Nothing in the tree is known to build such an skb;โฆ
--
net: skbuff: refuse to segment a nested frag_list
This adds a check to skb_segment() that rejects an skb whose frag_list
members have frag_lists of their own. It fails with -EINVAL and calls
DEBUG_NET_WARN_ON_ONCE(), since the segmentation walk would otherwise run
out of members and dereference a NULL list_skb.
> Nothing in the tree is known to build such an skb; GRO flushes instead
> of chaining an skb that already has a frag_list. Check for it up front
[Severity: Low]
Is the first half of this sentence accurate as a general statement?
IP fragment reassembly appears to build exactly this layout. When the
first fragment already has a frag_list, inet_frag_reasm_prepare() moves
that frag_list under a new zero-length skb:
net/ipv4/inet_fragment.c:inet_frag_reasm_prepare() {
...
if (skb_has_frag_list(head)) {
struct sk_buff *clone;
...
clone = alloc_skb(0, GFP_ATOMIC);
...
skb_shinfo(clone)->frag_list = skb_shinfo(head)->frag_list;
skb_frag_list_init(head);
...
skb_shinfo(head)->frag_list = clone;
nextp = &clone->next;
...
}
The result is head -> frag_list[clone -> frag_list[...]]. That is the
nested layout the new check in skb_segment() rejects.
The GRO part is correct. dev_gro_receive() sets:
NAPI_GRO_CB(skb)->flush = skb_has_frag_list(skb);
Reassembled skbs are not GSO, so they don't normally reach skb_segment().
The narrower claim seems to be what's meant: no in-tree path builds a GSO
skb with a nested frag_list.
Could the commit message say that instead, and mention IP defrag as a
known non-GSO source of nested frag_lists?
--
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:
<179273113115.3134.9365887081510077540@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-350913-linux-kernel-netdev=dewy.ruReferences:
<20261019-b4-skbuff-bug-on-followups-v1-11-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-350913-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next 11/15] net: skbuff: refuse to segment a nested frag_list Date: Fri, 23 Oct 2026 04:52:11 +0000 Organization: Usenet Network Message-ID: <179273113115.3134.9365887081510077540@kernel.org> References: <20261019-b4-skbuff-bug-on-followups-v1-11-41dbef50b9f7@toxicpanda.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="413313"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:LTzF73QGub42DkUJJCJBUVboxlE= sha256:sapHJaLZpKRVwb9u3WNIIKkzfsXPZ1+ETkFK2L3ENo0= sha1:97aZeWLcNmGNHfKfUkSUNbssQLY= sha256:J9n8IfHZP/YJ8y+1SruDZknEI2ylcB6K4rsL7l3mzok= 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 82BCF1113EA; Fri, 23 Oct 2026 07:57:47 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.739 X-Spam-Status: No, score=-3.739 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] 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 Thyec5lyYc1Q; Fri, 23 Oct 2026 07:57:44 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-350913-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 095A71113A5; Fri, 23 Oct 2026 07:57:36 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id D06C3416C0; Fri, 23 Oct 2026 04:52:17 +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=1792731133; b=bfKSMG6ULuKnXPFGHKhWz7YrQnBzVMVP92x9p7/u7nvNU/Z7yuTQ9aj/9jOtP86w0UnP Gjgqh31CG5IYN75jf0sHuBKd8VXK6dZ0XPWDMvFVbcu/0BdOvtDO9DFV9aic3DLVz42Kk e7X28VEEF+gpySo7thgStdvR7yJ9d89g2TVnxgnMXu88MZNRZbI7UQerI5JNFXM7gqkML UIsHDxerNwkpogYiFuLzzTRgDQPXTA16eRAtXTJRWDE6STM9XbbCZLx+32UMsNhpX6aLJ KtS7BZ2/o/ymDw40mMqyEVVVpSAtVBjRZIy2lUU13oKttTOzI1UGFI2OvVBO8HsYFgA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792731133; 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=agkvCklKmEd8Wp6mVSMBoVqEMTNMmcycBQEcregNfVo=; b=oODo4Z+CUtXfaNGfNe44ZlzSr41d3b728t61IpGIjIP58Rq1W3GTUsO9W6HzalUmGW16 lE9eOb+1ZTqz5A6OaT1bx6FVfxQsbv6zJiHrVCDWFJeo+CMCJCiVt7ubb/e968vMcqdbA pSMseC4QkPqkkuueNcLEWXWhwwlwU0YdQPj1FIN0xHLJODzEP3GiqJMZcw6wnAnN0OWVU LqwlQtcJ5WpS8/LQLoXqqzr53WdWFjFNsI40qVHMlY01gpJyfiyta8Y3SHJzQCYLhTHAl /kfuImohPsZ+sQCgaFlJah0a2D5JdjfT9xMf4T+6U+NtOw/lYGjT8WyKg1ifjFslG3w== 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=egaoWeXY; 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 9F0BE606A32A; Fri, 23 Oct 2026 04:52:13 +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=egaoWeXY 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=1792731132; b=ZSsT1403eAok8DX5MCe6SyAnUrdRlRlQF90wSbZXhF7hswT79yT0GtQZ3HdfmIzhcE7H DVMSNS6xGnY5DUcoYO0w+IMnN5byR6xR1Ek58ZhVcc+nUye0QBJzvKeZqjXlA9NQA+dwL DH/Pu0YNVeNlSg6PYClKxeuZQ7xU8/NyvCrPc+fUDKbNJZ1zlIoEFc8p8bCla61ejCTvW Oi+WMIAiONOESDpsLwvNOem4wTQAfC+peiD16QBKzLp8XrXzX+s3vmWqKgMkTFfSh61la /fGXy6CHn9EPQ/4cE5aw+ULqw5drkc7WA18byCPZiiMKjgxmoD8eGczqnIlq1yA0fyA== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792731132; 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=agkvCklKmEd8Wp6mVSMBoVqEMTNMmcycBQEcregNfVo=; b=xE7UlAqIT2aKutfCBenewbZwJVHNUmm5bVXO0JIyppHEFt1MSU/vh4He+jB8LvZ5/D8c w7uDJMIl7/w90GJ6gnSDxaDE4qyrr0yGzboT8R62XiL47HbtaRBzqYE4szP2tatF8OJd/ ST3y+Hfoa6R0G0/nL3atm3linQEc+9N6QctwsyHxqsWvNWF5+AIdjq1LqVmEhrKrWa9xz hJ94C02PzSgXzA/WL+J8yzq4hswuHVrsT5udzD6/iZB7724JLYg3mUu6qLSqrCPl0fvLI KYXH+qd90wYc/T2qdizXJq5L9I5Zp6PBvVCLOsavBTem6v23X1JcXrnkKNE6/3nF1MA== 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=egaoWeXY; 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 86C4860A260E for <netdev@vger.kernel.org>; Fri, 23 Oct 2026 04:52:12 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 959C41F01825; Fri, 23 Oct 2026 04:52:11 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1792731132; bh=agkvCklKmEd8Wp6mVSMBoVqEMTNMmcycBQEcregNfVo=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=egaoWeXYUJlTrjLH3F6bQMXw18UbNdnbpS+dRSabHlQD9C/AeZOtHA9cr0o/UxpQU tmTHIqaypY0rM6WJSD3sGo7DnT1Zkr8pWqM0qo0GLWqTb1vJbqm1LLavuOtc6ORwyI kOLvXSjea4i2T8GXpLijTp9Fsh1/aEDZDShjnmghI9kkbFwOEsVxY0fNKf/0L01bxz +7UJ4e08bNKe/mS9VtdtX26PgFbKT316nG6h4msxi9zsqOnIW14ym2aEp7Sq/yXrcF oo3uzlQddM6jfX0uSqrGMxXJGIFIGpXL6Rdb4be6b/dOGBF+ErgxMYRdS70/6rL6od n8owJ7ZO8cU7A== 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-11-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