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=-7.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS autolearn=unavailable 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 8F0A6C282C5 for ; Fri, 25 Jan 2019 02:24:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5EAD0218CD for ; Fri, 25 Jan 2019 02:24:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728544AbfAYCYW (ORCPT ); Thu, 24 Jan 2019 21:24:22 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:2751 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728199AbfAYCYW (ORCPT ); Thu, 24 Jan 2019 21:24:22 -0500 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 8713811799EE7DD41536; Fri, 25 Jan 2019 10:24:20 +0800 (CST) Received: from [127.0.0.1] (10.177.96.96) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.408.0; Fri, 25 Jan 2019 10:24:16 +0800 Subject: Re: [PATCH stable 4.4 06/11] ipv6: defrag: drop non-last frags smaller than min mtu To: Greg KH References: <1548209986-83527-1-git-send-email-maowenan@huawei.com> <1548209986-83527-7-git-send-email-maowenan@huawei.com> <20190124183103.GA18657@kroah.com> CC: , , , , From: maowenan Message-ID: <42288a9d-c288-7932-e670-83f0e2b40f90@huawei.com> Date: Fri, 25 Jan 2019 10:24:15 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20190124183103.GA18657@kroah.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.96.96] X-CFilter-Loop: Reflected Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 2019/1/25 2:31, Greg KH wrote: > On Wed, Jan 23, 2019 at 10:19:41AM +0800, Mao Wenan wrote: >> From: Florian Westphal >> >> [ Upstream commit 0ed4229b08c13c84a3c301a08defdc9e7f4467e6 ] >> >> don't bother with pathological cases, they only waste cycles. >> IPv6 requires a minimum MTU of 1280 so we should never see fragments >> smaller than this (except last frag). >> >> v3: don't use awkward "-offset + len" >> v2: drop IPv4 part, which added same check w. IPV4_MIN_MTU (68). >> There were concerns that there could be even smaller frags >> generated by intermediate nodes, e.g. on radio networks. >> >> Cc: Peter Oskolkov >> Cc: Eric Dumazet >> Signed-off-by: Florian Westphal >> Signed-off-by: David S. Miller >> Signed-off-by: Mao Wenan >> --- >> net/ipv6/netfilter/nf_conntrack_reasm.c | 4 ++++ >> net/ipv6/reassembly.c | 4 ++++ >> 2 files changed, 8 insertions(+) >> >> diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c >> index 9cd8863..c5033a2 100644 >> --- a/net/ipv6/netfilter/nf_conntrack_reasm.c >> +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c >> @@ -602,6 +602,10 @@ struct sk_buff *nf_ct_frag6_gather(struct net *net, struct sk_buff *skb, u32 use >> hdr = ipv6_hdr(clone); >> fhdr = (struct frag_hdr *)skb_transport_header(clone); >> >> + if (skb->len - skb_network_offset(skb) < IPV6_MIN_MTU && >> + fhdr->frag_off & htons(IP6_MF)) >> + return -EINVAL; > > This backport is incorrect, you should be returning a pointer, right? Thank you for correcting me, the return value should be a pointer, I will fix it and test all of patches again, then resend v2. sorry for my mistake. > > How did you test this? This should have blown up under test :( > > I'm going to drop this whole series. Please fix it up and test it > properly and then resend. > > thanks, > > greg k-h > > . >