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

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