Re: [PATCH 1/2] net: ipv4: Fix a possible null-pointer dereference in inet_csk_rebuild_route()

2019-07-27 Thread David Miller
From: Jia-Ju Bai Date: Fri, 26 Jul 2019 10:25:34 +0800 > diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c > index f5c163d4771b..27d9d80f3401 100644 > --- a/net/ipv4/inet_connection_sock.c > +++ b/net/ipv4/inet_connection_sock.c > @@ -1073,7 +1073,10 @@ static struct

Re: [PATCH 1/2] net: ipv4: Fix a possible null-pointer dereference in inet_csk_rebuild_route()

2019-07-26 Thread Nicolas Dichtel
Le 26/07/2019 à 04:25, Jia-Ju Bai a écrit : > In inet_csk_rebuild_route(), rt is assigned to NULL on line 1071. > On line 1076, rt is used: > return >dst; > Thus, a possible null-pointer dereference may occur.> > To fix this bug, rt is checked before being used. > > This bug is found by a

[PATCH 1/2] net: ipv4: Fix a possible null-pointer dereference in inet_csk_rebuild_route()

2019-07-25 Thread Jia-Ju Bai
In inet_csk_rebuild_route(), rt is assigned to NULL on line 1071. On line 1076, rt is used: return >dst; Thus, a possible null-pointer dereference may occur. To fix this bug, rt is checked before being used. This bug is found by a static analysis tool STCheck written by us. Signed-off-by: