net: Fix usage of pskb_trim_rcsum

[ Upstream commit 6c57f04580 ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Ross Lagerwall 2019-01-17 15:34:38 +00:00 • committed by Greg Kroah-Hartman
commit 38c00a1831
5 changed files with 5 additions and 0 deletions