xfrm: Fix memleak on xfrm state destroy
authorSteffen Klassert <steffen.klassert@secunet.com>
Wed, 6 Nov 2019 07:13:49 +0000 (08:13 +0100)
committerSteffen Klassert <steffen.klassert@secunet.com>
Thu, 7 Nov 2019 09:38:07 +0000 (10:38 +0100)
commit86c6739eda7d2a03f2db30cbee67a5fb81afa8ba
tree2bf5a1081ccd62010fa98aa52e67ced8becd44b4
parent99a8efbb6e30b72ac98cecf81103f847abffb1e5
xfrm: Fix memleak on xfrm state destroy

We leak the page that we use to create skb page fragments
when destroying the xfrm_state. Fix this by dropping a
page reference if a page was assigned to the xfrm_state.

Fixes: cac2661c53f3 ("esp4: Avoid skb_cow_data whenever possible")
Reported-by: JD <jdtxs00@gmail.com>
Reported-by: Paul Wouters <paul@nohats.ca>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_state.c