net: Fix usage of pskb_trim_rcsum
authorRoss Lagerwall <ross.lagerwall@citrix.com>
Thu, 17 Jan 2019 15:34:38 +0000 (15:34 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Jan 2019 22:05:14 +0000 (14:05 -0800)
commit6c57f0458022298e4da1729c67bd33ce41c14e7a
treec56bc8518423b39cabbda138327a313262ea1e9e
parente40e2a2e78664fa90ea4b9bdf4a84efce2fea9d9
net: Fix usage of pskb_trim_rcsum

In certain cases, pskb_trim_rcsum() may change skb pointers.
Reinitialize header pointers afterwards to avoid potential
use-after-frees. Add a note in the documentation of
pskb_trim_rcsum(). Found by KASAN.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ppp/pppoe.c
include/linux/skbuff.h
net/bridge/br_netfilter_ipv6.c
net/bridge/netfilter/nft_reject_bridge.c
net/ipv4/ip_input.c