Blame SOURCES/0033-ip-route-Fix-parse_encap_seg6-srh-parsing.patch

930fb9
From ffe33dd788af80a6645ab62b1df8e8f215b8902a Mon Sep 17 00:00:00 2001
930fb9
From: Phil Sutter <psutter@redhat.com>
930fb9
Date: Thu, 25 Oct 2018 12:24:30 +0200
930fb9
Subject: [PATCH] ip-route: Fix parse_encap_seg6() srh parsing
930fb9
930fb9
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1602555
930fb9
Upstream Status: iproute2.git commit 3b5c5ef0a75a9
930fb9
930fb9
commit 3b5c5ef0a75a9f685e78cd25da78706b5077bd83
930fb9
Author: Phil Sutter <phil@nwl.cc>
930fb9
Date:   Thu Oct 18 15:44:14 2018 +0200
930fb9
930fb9
    ip-route: Fix parse_encap_seg6() srh parsing
930fb9
930fb9
    In case caller did not specify 'segs' parameter, parse_srh() would read
930fb9
    garbage while iterating over 'segbuf'. Avoid this by initializing
930fb9
    'segbuf' to an empty string.
930fb9
930fb9
    Fixes: e8493916a8ede ("iproute: add support for SR-IPv6 lwtunnel encapsulation")
930fb9
    Signed-off-by: Phil Sutter <phil@nwl.cc>
930fb9
    Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
930fb9
---
930fb9
 ip/iproute_lwtunnel.c | 2 +-
930fb9
 1 file changed, 1 insertion(+), 1 deletion(-)
930fb9
930fb9
diff --git a/ip/iproute_lwtunnel.c b/ip/iproute_lwtunnel.c
930fb9
index 85045d4..4ebfaa7 100644
930fb9
--- a/ip/iproute_lwtunnel.c
930fb9
+++ b/ip/iproute_lwtunnel.c
930fb9
@@ -494,7 +494,7 @@ static int parse_encap_seg6(struct rtattr *rta, size_t len, int *argcp,
930fb9
 	struct seg6_iptunnel_encap *tuninfo;
930fb9
 	struct ipv6_sr_hdr *srh;
930fb9
 	char **argv = *argvp;
930fb9
-	char segbuf[1024];
930fb9
+	char segbuf[1024] = "";
930fb9
 	int argc = *argcp;
930fb9
 	int encap = -1;
930fb9
 	__u32 hmac = 0;
930fb9
-- 
930fb9
1.8.3.1
930fb9