From: Ido Schimmel <idosch@nvidia.com>
To: Ren Wei <weir@nebusec.ai>
Cc: netdev@vger.kernel.org, dsahern@kernel.org, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
horms@kernel.org, vega@nebusec.ai, edragain@163.com
Subject: Re: [PATCH net v2 1/1] ipv4: reject undersized MTUs in ip_do_fragment()
Date: Sun, 16 Aug 2026 13:44:40 +0300 [thread overview]
Message-ID: <20260816104440.GA8589@shredder> (raw)
In-Reply-To: <8809ef6314b98913681b0b370a05a85c2b6cd579.1786599079.git.edragain@163.com>
On Fri, Aug 14, 2026 at 01:35:26AM +0800, Ren Wei wrote:
> From: Yong Wang <edragain@163.com>
>
> ip_do_fragment() subtracts the IPv4 header length from the effective
> MTU and passes the resulting payload MTU to ip_frag_next().
>
> If the effective MTU is smaller than hlen + 8, ip_frag_next() rounds
> the fragment payload length down to zero. The fragmentation state then
> never makes forward progress: state->left, state->ptr and state->offset
> stay unchanged while ip_do_fragment() keeps allocating and transmitting
> header-only fragments until the softlockup detector fires.
>
> This is reproducible with a route installed using "mtu lock 20", but it
> is also reproducible without route MTU lock, for example by forwarding a
> packet to a device whose MTU is 20.
>
> Fix it in ip_do_fragment() by rejecting mtu < hlen + 8 with -EMSGSIZE,
> matching the existing IPv6 fragmentation check.
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Cc: stable@vger.kernel.org
> Reported-by: Vega <vega@nebusec.ai>
> Assisted-by: Codex:GPT-5.4
> Signed-off-by: Yong Wang <edragain@163.com>
> Signed-off-by: Ren Wei <weir@nebusec.ai>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
next prev parent reply other threads:[~2026-08-16 10:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-13 17:35 [PATCH net v2 0/1] ipv4: fix a non-progressing fragmentation loop from undersized effective MTUs Ren Wei
2026-08-13 17:35 ` [PATCH net v2 1/1] ipv4: reject undersized MTUs in ip_do_fragment() Ren Wei
2026-08-16 10:44 ` Ido Schimmel [this message]
2026-08-18 16:50 ` [PATCH net v2 0/1] ipv4: fix a non-progressing fragmentation loop from undersized effective MTUs patchwork-bot+netdevbpf
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=20260816104440.GA8589@shredder \
--to=idosch@nvidia.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edragain@163.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vega@nebusec.ai \
--cc=weir@nebusec.ai \
/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