From: Wang Zhan <wang.zhan@smartx.com>
To: netdev@vger.kernel.org,
Joas Antonio dos Santos <joasantonio108@gmail.com>
Cc: Wang Zhan <wang.zhan@smartx.com>,
Paul Moore <paul@paul-moore.com>,
Eric Dumazet <edumazet@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
linux-security-module@vger.kernel.org,
Alice Mikityanska <alice.kernel@fastmail.im>
Subject: Re: [PATCH net] calipso: keep BIG TCP payload_len in calipso_skbuff_setattr()
Date: Fri, 9 Oct 2026 16:46:16 +0800 [thread overview]
Message-ID: <20261009084616.139462-1-wang.zhan@smartx.com> (raw)
In-Reply-To: <179147330473.58090.15760316487710432833@gmail.com>
On Thu, 08 Oct 2026 12:28:24 -0300 Joas Antonio dos Santos wrote:
> @@ -1357,8 +1357,9 @@ static int calipso_skbuff_setattr(struct sk_buff *skb,
> sizeof(*ip6_hdr) + start);
> skb_reset_network_header(skb);
> ip6_hdr = ipv6_hdr(skb);
> - payload = ntohs(ip6_hdr->payload_len);
> - ip6_hdr->payload_len = htons(payload + len_delta);
> + /* BIG TCP packets have payload_len == 0 */
> + if (ip6_hdr->payload_len)
> + be16_add_cpu(&ip6_hdr->payload_len, len_delta);
Hi,
I think there are boundary cases around IPV6_MAXPLEN: growing past it
can cause payload_len to overflow, while shrinking below it leaves
payload_len at zero.
Could we use ipv6_set_payload_len(ip6_hdr, skb->len - sizeof(*ip6_hdr))
to set the length here? I haven't checked the details, though.
next prev parent reply other threads:[~2026-10-09 8:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-08 15:28 [PATCH net] calipso: keep BIG TCP payload_len in calipso_skbuff_setattr() Joas Antonio dos Santos
2026-10-09 8:46 ` Wang Zhan [this message]
2026-10-09 15:57 ` Joas Antonio dos Santos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261009084616.139462-1-wang.zhan@smartx.com \
--to=wang.zhan@smartx.com \
--cc=alice.kernel@fastmail.im \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=joasantonio108@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=paul@paul-moore.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox