From: Tianyi Gao <tianyi@cloudflare.com>
To: netdev-bot+sinfo@kernel.org
Cc: netdev@vger.kernel.org, magnus.karlsson@intel.com,
maciej.fijalkowski@intel.com, sdf@fomichev.me,
davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
pabeni@redhat.com, horms@kernel.org, ast@kernel.org,
daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com,
yoong.siang.song@intel.com, kerneljasonxing@gmail.com,
bpf@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-team@cloudflare.com, tianyi.gao@linux.dev,
Sashiko <sashiko-bot@kernel.org>
Subject: Re: [PATCH net] xsk: reject TX checksum requests that overflow skb->csum_start
Date: Mon, 16 Nov 2026 17:03:41 +0000 [thread overview]
Message-ID: <20261116170341.53580-1-tianyi@cloudflare.com> (raw)
In-Reply-To: <179484673444.3291.12899618485319674206@kernel.org>
Hi,
On Mon, Nov 16, 2026 at 04:32:14PM +0000, netdev-bot+sinfo@kernel.org wrote:
> - Whether the issue was actually triggered, or is only theoretical
> (e.g. found by LLM and not proven at runtime). If it was triggered
> please include the symptoms, like the stack trace or kernel messages.
Sashiko reported this several times, and I reproduced it on a 64K-page
arm64 kernel built from net at aa40afa831eb, under QEMU.
The test sends one TX descriptor from an AF_XDP socket in copy mode on a
veth device, with XDP_UMEM_TX_SW_CSUM, a 64K chunk, a length of 65520,
csum_start 65500 and csum_offset 6. The headroom is 64, so
skb->csum_start wraps to 28:
skb len=65520 data_len=0 headroom=64 headlen=65520 tailroom=65168
csum(0x6001c start=28 offset=6 ip_summed=3 complete_sw=0 valid=0 level=0)
...
offset (-36) >= skb_headlen() (65520)
WARNING: net/core/dev.c:3696 at skb_checksum_help+0x1d0/0x238, CPU#0: xsk_csum_overfl/200
...
Call trace:
skb_checksum_help+0x1d0/0x238 (P)
__xsk_generic_xmit+0xb90/0xdf0
xsk_sendmsg+0xcc/0x188
__sys_sendto+0x128/0x1c0
__arm64_sys_sendto+0x2c/0x48
invoke_syscall.constprop.0+0x60/0x108
do_el0_svc+0x48/0xd8
el0_svc+0x40/0x238
el0t_64_sync_handler+0xa0/0xe8
el0t_64_sync+0x198/0x1a0
With this patch, sendmsg() returns -EINVAL and there is no warning.
Cheers,
Tianyi
prev parent reply other threads:[~2026-11-16 17:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 16:28 [PATCH net] xsk: reject TX checksum requests that overflow skb->csum_start Tianyi Gao
2026-11-16 16:32 ` netdev-bot+sinfo
2026-11-16 17:03 ` Tianyi Gao [this message]
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=20261116170341.53580-1-tianyi@cloudflare.com \
--to=tianyi@cloudflare.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=hawk@kernel.org \
--cc=horms@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=kernel-team@cloudflare.com \
--cc=kerneljasonxing@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maciej.fijalkowski@intel.com \
--cc=magnus.karlsson@intel.com \
--cc=netdev-bot+sinfo@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sashiko-bot@kernel.org \
--cc=sdf@fomichev.me \
--cc=tianyi.gao@linux.dev \
--cc=yoong.siang.song@intel.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