From: Greg Kroah-Hartman Date: Mon, 2 Dec 2019 18:49:49 +0000 (+0100) Subject: 5.3-stable patches X-Git-Tag: v5.4.2~37 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=301b977f499999aeca1406f7ab595feb9f856a35;p=thirdparty%2Fkernel%2Fstable-queue.git 5.3-stable patches added patches: xfrm-fix-memleak-on-xfrm-state-destroy.patch --- diff --git a/queue-5.3/series b/queue-5.3/series index a90ff9c122f..07612028010 100644 --- a/queue-5.3/series +++ b/queue-5.3/series @@ -104,3 +104,4 @@ usb-serial-ftdi_sio-add-device-ids-for-u-blox-c099-f9p.patch mei-bus-prefix-device-names-on-bus-with-the-bus-name.patch mei-me-add-comet-point-v-device-id.patch thunderbolt-power-cycle-the-router-if-nvm-authentication-fails.patch +xfrm-fix-memleak-on-xfrm-state-destroy.patch diff --git a/queue-5.3/xfrm-fix-memleak-on-xfrm-state-destroy.patch b/queue-5.3/xfrm-fix-memleak-on-xfrm-state-destroy.patch new file mode 100644 index 00000000000..9758b278442 --- /dev/null +++ b/queue-5.3/xfrm-fix-memleak-on-xfrm-state-destroy.patch @@ -0,0 +1,34 @@ +From 86c6739eda7d2a03f2db30cbee67a5fb81afa8ba Mon Sep 17 00:00:00 2001 +From: Steffen Klassert +Date: Wed, 6 Nov 2019 08:13:49 +0100 +Subject: xfrm: Fix memleak on xfrm state destroy + +From: Steffen Klassert + +commit 86c6739eda7d2a03f2db30cbee67a5fb81afa8ba upstream. + +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 +Reported-by: Paul Wouters +Signed-off-by: Steffen Klassert +Signed-off-by: Greg Kroah-Hartman + +--- + net/xfrm/xfrm_state.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/net/xfrm/xfrm_state.c ++++ b/net/xfrm/xfrm_state.c +@@ -495,6 +495,8 @@ static void ___xfrm_state_destroy(struct + x->type->destructor(x); + xfrm_put_type(x->type); + } ++ if (x->xfrag.page) ++ put_page(x->xfrag.page); + xfrm_dev_state_free(x); + security_xfrm_state_free(x); + xfrm_state_free(x);