diff options
| author | 2026-10-07 17:36:01 +0000 | |
|---|---|---|
| committer | 2026-10-15 17:47:39 -0700 | |
| commit | 7b32bee7db821e6b4d92d29708c24539e2b5464f (patch) | |
| tree | 7d3b28ee67affbf7c44f036e277f0f3883db8a86 /scripts/Makefile.thinlto | |
| parent | net: skbuff: don't BUG() on bad arguments to pskb_expand_head() (diff) | |
net: skbuff: don't BUG() on a bad frag_list layout in skb_segment()
skb_segment()'s frag_list walk assumes the GRO-shaped layout it expects
and BUG()s when the layout doesn't match. Anybody who can get a
malformed GSO skb to a segmentation point gets to crash the box. Most
recently commit d5dc1e69fd72 ("inet: frags: strip GSO state from
fragments before reassembly") fixed one that an unprivileged user could
trigger with two writes to a tap device in their own user namespace.
commit 3382a1ed7f77 ("net: fix udp gso skb_segment after pull from
frag_list") fixed another.
skb_segment() already has an error path for a bad layout: the
too-many-frags check sets -EINVAL and frees the partial segment list.
Take that path for the four layout checks, with a
DEBUG_NET_WARN_ON_ONCE() for debug kernels. The packet gets dropped,
which is what should happen to a packet we can't segment.
The one check that runs after skb_clone() and before the clone is
linked into the segment list frees the clone itself.
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Link: https://patch.msgid.link/20261007-b4-skbuff-bug-on-v2-2-b9a5f732895b@toxicpanda.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
