From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Oskolkov Subject: [PATCH v2 net-next 0/3] ip: Use rb trees for IP frag queue Date: Thu, 2 Aug 2018 23:34:36 +0000 Message-ID: <20180802233439.51643-1-posk@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: Eric Dumazet , Florian Westphal , Peter Oskolkov To: David Miller , netdev@vger.kernel.org Return-path: Received: from mail-io0-f202.google.com ([209.85.223.202]:36311 "EHLO mail-io0-f202.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727053AbeHCB2I (ORCPT ); Thu, 2 Aug 2018 21:28:08 -0400 Received: by mail-io0-f202.google.com with SMTP id y13-v6so2825558iop.3 for ; Thu, 02 Aug 2018 16:34:44 -0700 (PDT) Sender: netdev-owner@vger.kernel.org List-ID: 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(-) -- 2.18.0.597.ga71716f1ad-goog