diff mbox

[3.11,124/138] ipv4: initialise the itag variable in __mkroute_input

Message ID 1401795584-22664-125-git-send-email-luis.henriques@canonical.com
State New
Headers show

Commit Message

Luis Henriques June 3, 2014, 11:39 a.m. UTC
3.11.10.11 -stable review patch.  If anyone has any objections, please let me know.

------------------

From: Li RongQing <roy.qing.li@gmail.com>

commit fbdc0ad095c0a299e9abf5d8ac8f58374951149a upstream.

the value of itag is a random value from stack, and may not be initiated by
fib_validate_source, which called fib_combine_itag if CONFIG_IP_ROUTE_CLASSID
is not set

This will make the cached dst uncertainty

Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
 net/ipv4/route.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 06329ca4787d..68091be23be2 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1527,7 +1527,7 @@  static int __mkroute_input(struct sk_buff *skb,
 	struct in_device *out_dev;
 	unsigned int flags = 0;
 	bool do_cache;
-	u32 itag;
+	u32 itag = 0;
 
 	/* get a working reference to the output device */
 	out_dev = __in_dev_get_rcu(FIB_RES_DEV(*res));