Skip to content

ip: Use rb trees for IP frag queue

Peter Oskolkov netdev 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 3 repliesIn review
  2. v13 patches 4 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3ip: discard IPv4 datagrams with overlapping segments.include/uapi/linux/snmp.h net/ipv4/ip_fragment.c net/ipv4/proc.c+21 -561 reply
2/3net: modify skb_rbtree_purge to return the truesize of all purged skbs.include/linux/skbuff.h net/core/skbuff.c+6 -20 replies
3/3ip: use rb trees for IP frag queue.include/linux/skbuff.h include/net/inet_frag.h net/ipv4/inet_fragment.c +3 more+121 -910 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchStephen Hemminger
1/3A-b
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 net-next 0/3] ip: Use rb trees for IP frag queue

This patchset
* changes IPv4 defrag behavior to match that of IPv6: overlapping fragments now cause the whole IP datagram to be discarded (suggested by David Miller): there are no legitimate use cases for overlapping fragments;
* changes IPv4 defrag queue from a list to a rb tree (suggested by Eric Dumazet): this change removes a potential attach vector.

Upcoming patches will contain similar changes for IPv6 frag queue, as well as a comprehensive IP defrag self-test (temporarily delayed).

Peter Oskolkov (3):
ip: discard IPv4 datagrams with overlapping segments.
net: modify skb_rbtree_purge to return the truesize of all purged
skbs.
ip: use rb trees for IP frag queue.

 include/linux/skbuff.h                  |  11 +-
 include/net/inet_frag.h                 |   3 +-
 include/uapi/linux/snmp.h               |   1 +
 net/core/skbuff.c                       |   6 +-
 net/ipv4/inet_fragment.c                |  16 +-
 net/ipv4/ip_fragment.c                  | 239 +++++++++++-------------
 net/ipv4/proc.c                         |   1 +
 net/ipv6/netfilter/nf_conntrack_reasm.c |   1 +
 net/ipv6/reassembly.c                   |   1 +
 9 files changed, 139 insertions(+), 140 deletions(-)
Signature · 1 line
2.18.0.597.ga71716f1ad-goog