From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net] ipv4: frags: handle possible skb truesize change Date: Tue, 31 Jul 2018 14:45:35 -0700 (PDT) Message-ID: <20180731.144535.1317399050532306183.davem@davemloft.net> References: <20180731045029.48957-1-edumazet@google.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com To: edumazet@google.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:59726 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727076AbeGaX15 (ORCPT ); Tue, 31 Jul 2018 19:27:57 -0400 In-Reply-To: <20180731045029.48957-1-edumazet@google.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Eric Dumazet Date: Mon, 30 Jul 2018 21:50:29 -0700 > ip_frag_queue() might call pskb_pull() on one skb that > is already in the fragment queue. > > We need to take care of possible truesize change, or we > might have an imbalance of the netns frags memory usage. > > IPv6 is immune to this bug, because RFC5722, Section 4, > amended by Errata ID 3089 states : > > When reassembling an IPv6 datagram, if > one or more its constituent fragments is determined to be an > overlapping fragment, the entire datagram (and any constituent > fragments) MUST be silently discarded. > > Fixes: 158f323b9868 ("net: adjust skb->truesize in pskb_expand_head()") > Signed-off-by: Eric Dumazet Applied and queued up for -stable. Frankly, I think we should enforce the ipv6 rules for ipv4 too. There is absolutely no reasonable situation where overlapping fragment queue entries should arrive. None whatsoever.