BACKPORT: FROMGIT: ipv4: frags: handle possible skb truesize change

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 <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 4672694bd4f1aebdab0ad763ae4716e89cb15221
 git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git master)

BUG=chromium:869941
TEST=Run IP fragmentation tests

Change-Id: I1b30bd6c5c56d4b610388b848b920396fa905725
Signed-off-by: Guenter Roeck <groeck@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1159390
Commit-Queue: Aditya Kali <adityakali@google.com>
Tested-by: Aditya Kali <adityakali@google.com>
1 file changed