Re: [PATCH 2/2] net: ipv6: Fix a possible null-pointer dereference in vti6_link_config()

2019-07-27 Thread David Miller
From: Jia-Ju Bai Date: Fri, 26 Jul 2019 16:03:21 +0800 > @@ -646,9 +646,10 @@ static void vti6_link_config(struct ip6_tnl *t, bool > keep_mtu) >&p->raddr, &p->laddr, >p->link, NULL, strict); > > -

Re: [PATCH 2/2] net: ipv6: Fix a possible null-pointer dereference in vti6_link_config()

2019-07-26 Thread Nicolas Dichtel
Le 26/07/2019 à 10:03, Jia-Ju Bai a écrit : > In vti6_link_config(), there is an if statement on line 649 to check > whether rt is NULL: > if (rt) > > When rt is NULL, it is used on line 651: > ip6_rt_put(rt); > dst_release(&rt->dst); > > Thus, a possible null-pointer dereference

[PATCH 2/2] net: ipv6: Fix a possible null-pointer dereference in vti6_link_config()

2019-07-26 Thread Jia-Ju Bai
In vti6_link_config(), there is an if statement on line 649 to check whether rt is NULL: if (rt) When rt is NULL, it is used on line 651: ip6_rt_put(rt); dst_release(&rt->dst); Thus, a possible null-pointer dereference may occur. To fix this bug, ip6_rt_put() is called when rt is