Skip to content

ipv4: fix IP ID reuse for GSO packets

Eric Dumazet netdev 2 versions – Applied

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

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 2 repliesApplied 2/2
  2. v12 patches 7 repliesSuperseded

Patches in v2 All 2 applied

#Subject and filesSizeRepliesApplied
1/2ipv4: fix IP ID reuse in ip_select_ident_segs()include/net/ip.h+1 -11 replyApplied
2/2ipv4: reserve one IP ID per segment for UDP GSO packetsnet/ipv4/ip_output.c+14 -11 replyApplied

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchJiayuan ChenDavid AhernWillem de Bruijn
1/2R-b R-b R-b
2/2R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 net 0/2] ipv4: fix IP ID reuse for GSO packets

This series fixes two cases where IPv4 GSO packets can reuse the IP IDs of previous packets:

- Patch 1 fixes ip_select_ident_segs() for non-TCP sockets, which uses the first IP ID of the next packet since commit f866fbc842de ("ipv4: fix data-races around inet->inet_id"). SCTP GSO is affected.

- Patch 2 makes __ip_make_skb() reserve one IP ID per segment for UDP GSO packets, instead of a single one.

Both issues were found by code inspection.

v2: Patch 2: add a sk_is_udp() check (David Ahern)
v1: https://lore.kernel.org/netdev/[email protected]/

Eric Dumazet (2):
ipv4: fix IP ID reuse in ip_select_ident_segs()
ipv4: reserve one IP ID per segment for UDP GSO packets

 include/net/ip.h     |  2 +-
 net/ipv4/ip_output.c | 15 ++++++++++++++-
 2 files changed, 15 insertions(+), 2 deletions(-)
Signature · 1 line
2.56.0.rc1.315.gc6ed9934b7-goog