Home Home > GIT Browse > SLE15-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-02-14 11:39:11 +0100
committerTakashi Iwai <tiwai@suse.de>2019-02-14 11:39:23 +0100
commit5e4fe86960a8c678ba5a0e13ce7dd2db2fa4ac2d (patch)
treef591f391916e266a845b957313b7560326053d64
parent73bd8f9c3ffad2d4f2cb8a175b1860e3ded18097 (diff)
esp6: fix memleak on error path in esp6_input (bsc#1051510).
-rw-r--r--patches.fixes/esp6-fix-memleak-on-error-path-in-esp6_input.patch41
-rw-r--r--series.conf1
2 files changed, 42 insertions, 0 deletions
diff --git a/patches.fixes/esp6-fix-memleak-on-error-path-in-esp6_input.patch b/patches.fixes/esp6-fix-memleak-on-error-path-in-esp6_input.patch
new file mode 100644
index 0000000000..1493d84b5c
--- /dev/null
+++ b/patches.fixes/esp6-fix-memleak-on-error-path-in-esp6_input.patch
@@ -0,0 +1,41 @@
+From 7284fdf39a912322ce97de2d30def3c6068a418c Mon Sep 17 00:00:00 2001
+From: Zhen Lei <thunder.leizhen@huawei.com>
+Date: Wed, 27 Jun 2018 11:49:28 +0800
+Subject: [PATCH] esp6: fix memleak on error path in esp6_input
+Git-commit: 7284fdf39a912322ce97de2d30def3c6068a418c
+Patch-mainline: v4.18-rc8
+References: bsc#1051510
+
+This ought to be an omission in e6194923237 ("esp: Fix memleaks on error
+paths."). The memleak on error path in esp6_input is similar to esp_input
+of esp4.
+
+Fixes: e6194923237 ("esp: Fix memleaks on error paths.")
+Fixes: 3f29770723f ("ipsec: check return value of skb_to_sgvec always")
+Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
+Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ net/ipv6/esp6.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c
+index 97513f35bcc5..88a7579c23bd 100644
+--- a/net/ipv6/esp6.c
++++ b/net/ipv6/esp6.c
+@@ -669,8 +669,10 @@ static int esp6_input(struct xfrm_state *x, struct sk_buff *skb)
+
+ sg_init_table(sg, nfrags);
+ ret = skb_to_sgvec(skb, sg, 0, skb->len);
+- if (unlikely(ret < 0))
++ if (unlikely(ret < 0)) {
++ kfree(tmp);
+ goto out;
++ }
+
+ skb->ip_summed = CHECKSUM_NONE;
+
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index 43f7e7b1e5..9783243f20 100644
--- a/series.conf
+++ b/series.conf
@@ -17619,6 +17619,7 @@
patches.suse/net-fix-amd-xgbe-flow-control-issue.patch
patches.suse/net-ena-Fix-use-of-uninitialized-DMA-address-bits-fi.patch
patches.fixes/vti6-fix-PMTU-caching-and-reporting-on-xmit.patch
+ patches.fixes/esp6-fix-memleak-on-error-path-in-esp6_input.patch
patches.fixes/0001-net-lan78xx-fix-rx-handling-before-first-packet-is-s.patch
patches.drivers/enic-handle-mtu-change-for-vf-properly.patch
patches.suse/ipv4-remove-BUG_ON-from-fib_compute_spec_dst.patch