From: Paolo Abeni <pabeni@redhat.com>
To: Eric Dumazet <edumazet@kernel.org>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>
Cc: Simon Horman <horms@kernel.org>, David Ahern <dsahern@kernel.org>,
Ido Schimmel <idosch@nvidia.com>,
netdev@vger.kernel.org, stable@vger.kernel.org,
Kyle Zeng <kylebot@openai.com>, Florian Westphal <fw@strlen.de>
Subject: Re: [PATCH v2 net] inet: frags: limit the truesize of a reassembly queue
Date: Mon, 2 Nov 2026 16:04:23 +0100 [thread overview]
Message-ID: <24feda7d-ae49-45af-9596-2cc5f149f28e@redhat.com> (raw)
In-Reply-To: <20261030081225.2575462-1-edumazet@kernel.org>
On 10/30/26 09:12, Eric Dumazet wrote:
> The truesize of fragments in a reassembly queue is only bounded by
> the per netns ipfrag_high_thresh sysctl, which has no upper limit.
>
> inet_frag_reasm_finish() sums the truesize of all fragments in an int.
> If this sum reaches 2^32, it wraps, and the final sk_wmem_alloc
> adjustment of the socket owning the reassembled skb can cancel its own
> reference, leading to a use-after-free of this socket.
>
> This can be triggered from an unprivileged user/network namespace,
> raising ipfrag_high_thresh and using padded TUN packets, which keep
> a large truesize after being trimmed by ip_rcv_core().
Clasiko infers a similar scenario is still reachable using multiple
concurrent frag queues:
https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261030081225.2575462-1-edumazet@kernel.org
I'm unsure if that should be dealt with separately?!?
Thanks,
Paolo
next prev parent reply other threads:[~2026-11-02 15:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-30 8:12 [PATCH v2 net] inet: frags: limit the truesize of a reassembly queue Eric Dumazet
2026-11-02 9:03 ` Ido Schimmel
2026-11-02 15:04 ` Paolo Abeni [this message]
2026-11-02 15:53 ` Eric Dumazet
2026-11-02 15:22 ` Jiayuan Chen
2026-11-02 18:50 ` Wang Zhan
2026-11-02 21:10 ` 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=24feda7d-ae49-45af-9596-2cc5f149f28e@redhat.com \
--to=pabeni@redhat.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@kernel.org \
--cc=fw@strlen.de \
--cc=horms@kernel.org \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=kylebot@openai.com \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.kernel.org \
/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