Skip to content

Guard against gso_segs overflows

Alice Mikityanska netdev 3 versions – Applied

Status from this message: This series was applied to netdev/net.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 0 repliesApplied 2/2
  2. v22 patches 2 repliesSuperseded
  3. v13 patches 1 replySuperseded

Patches in v3 All 2 applied

#Subject and filesSizeRepliesApplied
1/2virtio-net: Ensure that TCP packets don't overflow gso_segsinclude/linux/virtio_net.h+4 -00 repliesApplied
2/2net: Guard for gso_segs overflow in skb_segmentnet/core/skbuff.c+2 -10 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH net v3 0/2] Guard against gso_segs overflows

From: Alice Mikityanska <[email protected]>

This series is a follow-up on the discussion:

https://lore.kernel.org/netdev/CAD0BsJWzSr2zduf5v3mVC4zd=Lj6ZAoC+V42-VBdg42aDY8XXw@mail.gmail.com/T/#m1e22fca273c36cc8844e516505d3251cc1418fea

skb_segment is patched to avoid possible overflows in partial GSO. The primary possible source of too many GSO segments is also addressed:
virtio-net clamps gso_size to >=8 in TCP, as suggested by Eric.

v3 changes: Reordered the patches, added WARN to skb_segment.

v2: https://lore.kernel.org/netdev/[email protected]/

v2 changes: dropped new checks in fastpath from skb_gro_receive and __virtio_net_hdr_to_skb, replaced the latter with a silent clamp for gso_size, kept the cheap guard in skb_segment.

v1: https://lore.kernel.org/netdev/[email protected]/

Alice Mikityanska (2):
virtio-net: Ensure that TCP packets don't overflow gso_segs
net: Guard for gso_segs overflow in skb_segment

 include/linux/virtio_net.h | 4 ++++
 net/core/skbuff.c          | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)
Signature · 1 line
2.55.0