From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.6 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 367BEC10F03 for ; Tue, 23 Apr 2019 17:25:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 044B820835 for ; Tue, 23 Apr 2019 17:25:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="KIv/CFUM" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728722AbfDWRZj (ORCPT ); Tue, 23 Apr 2019 13:25:39 -0400 Received: from mail-pl1-f201.google.com ([209.85.214.201]:34413 "EHLO mail-pl1-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728447AbfDWRZj (ORCPT ); Tue, 23 Apr 2019 13:25:39 -0400 Received: by mail-pl1-f201.google.com with SMTP id s22so10735213plq.1 for ; Tue, 23 Apr 2019 10:25:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=+BI1s51baMJXVaJugHUG2H4cbDdXmxApO51knTs8xoE=; b=KIv/CFUM3rukZi8iTdJh7rjnZ9WAqCIuYzCGA+U6NDdGl5l7+EWAG5nmFe5ww52OqA ktu+yuYW1q4/TnMtoKGKUltqhtGFF2FZA0OD6A6N9Bz0MkvJcNGi24tfdOlWkytn/Dvh jBO6esNERhSKsPvEvEQ86YlgXUAgEoSJqY4ueK3E9qAkLqNxtaJCoJxG/0Kza9mvGYep 5hAjPVUn4890YRDpoQJp9a4qJ5HO1bG45q52lXOEp1kSZhEPtk27SzD9Kso5LGx+Ixlh m/uFYJ31HtDWWJtIiR1vx1fnroFyP6EhvPue2XC0Z0MCHW5MLkSO42R2GTslZpJPUzTB 5GnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=+BI1s51baMJXVaJugHUG2H4cbDdXmxApO51knTs8xoE=; b=fdyyhLRCSOSunmMLfxzBFRzAyLmINdVRNS9Jl3YAYtCAx/32DvugJmDoxyKlZSdbK9 1kbLZ7GHqXmz3l/JgBml14+V8SpJARmSpB04ZzOObp2xE3ePmkoAXEF+rpAFNjPFgnoF VAAHrTBoCBa1dNdepThX/xNH7io7ymfh2skIsByPGwEUTcdCdnLlRTX4hu2uif1/iMbY AszD03B5983/ZJdXA1T4hZi8CyDkWiWowOPvfy3xLj9LWfUW2VVIAVkA9OKAOaNzi1V7 cl0PNtRQuw0bsyd2reiKow0Md3hcBFk1HVcLOQ7l0yNfCVbdPiEkl4bafVj+TC0HOkBQ 6VBA== X-Gm-Message-State: APjAAAWlvF6flAz6YCVF386nJExG7srWWuCBeDBEAqFo4t30jxDYgKjN Onq6Tjn0arjzlAJisBMpLgPF3Nrh X-Google-Smtp-Source: APXvYqx9/4oKB2Q4xwi2EpgQKxuL+284nVlBsLZ/0ut7GqfknKWEKIbAzYaD6mK2IF9u+SMSk62dP3z4 X-Received: by 2002:a65:6144:: with SMTP id o4mr25387152pgv.247.1556040338498; Tue, 23 Apr 2019 10:25:38 -0700 (PDT) Date: Tue, 23 Apr 2019 10:25:30 -0700 Message-Id: <20190423172533.245939-1-posk@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.21.0.593.g511ec345e18-goog Subject: [PATCH 4.19 stable v2 0/3] net: ip6 defrag: backport fixes From: Peter Oskolkov To: Greg Kroah-Hartman , stable@vger.kernel.org, netdev@vger.kernel.org Cc: Peter Oskolkov , David Miller , Eric Dumazet , Sasha Levin , Captain Wiggum , Lars Persson , Peter Oskolkov Content-Type: text/plain; charset="UTF-8" Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org Lars Persson reported that a label was unused in the 4.14 version of this patchset, and the issue was present in the 4.19 patchset as well, so I'm sending a v2 that fixes it. The original 4.19 patchset queued for stable is OK, and can be used as is, but this v2 is a bit better: it fixes the unused label issue and handles overlapping fragments better. Sorry for the mess/v2. ======================= Currently, 4.19 and earlier stable kernels contain a security fix that is not fully IPv6 standard compliant. This patchset backports IPv6 defrag fixes from 5.1rc that restore standard-compliance. Original 5.1 patchet: https://patchwork.ozlabs.org/cover/1029418/ v2 changes: handle overlapping fragments the way it is done upstream Peter Oskolkov (3): net: IP defrag: encapsulate rbtree defrag code into callable functions net: IP6 defrag: use rbtrees for IPv6 defrag net: IP6 defrag: use rbtrees in nf_conntrack_reasm.c include/net/inet_frag.h | 16 +- include/net/ipv6_frag.h | 11 +- net/ipv4/inet_fragment.c | 293 +++++++++++++++++++++++ net/ipv4/ip_fragment.c | 302 +++--------------------- net/ipv6/netfilter/nf_conntrack_reasm.c | 260 ++++++-------------- net/ipv6/reassembly.c | 240 ++++++------------- 6 files changed, 488 insertions(+), 634 deletions(-) -- 2.21.0.593.g511ec345e18-goog