Re: [PATCH net] ipv4: Fix NULL pointer dereference in ipv4_neigh_lookup()

2019-07-05 Thread David Miller
From: Ido Schimmel Date: Thu, 4 Jul 2019 19:26:38 +0300 > From: Ido Schimmel > > Both ip_neigh_gw4() and ip_neigh_gw6() can return either a valid pointer > or an error pointer, but the code currently checks that the pointer is > not NULL. > > Fix this by checking that the pointer is not an er

Re: [PATCH net] ipv4: Fix NULL pointer dereference in ipv4_neigh_lookup()

2019-07-05 Thread David Ahern
On 7/4/19 1:24 PM, David Miller wrote: > From: Ido Schimmel > Date: Thu, 4 Jul 2019 19:26:38 +0300 > >> Both ip_neigh_gw4() and ip_neigh_gw6() can return either a valid pointer >> or an error pointer, but the code currently checks that the pointer is >> not NULL. > ... >> @@ -447,7 +447,7 @@ st

Re: [PATCH net] ipv4: Fix NULL pointer dereference in ipv4_neigh_lookup()

2019-07-04 Thread Ido Schimmel
On Thu, Jul 04, 2019 at 12:24:49PM -0700, David Miller wrote: > From: Ido Schimmel > Date: Thu, 4 Jul 2019 19:26:38 +0300 > > > Both ip_neigh_gw4() and ip_neigh_gw6() can return either a valid pointer > > or an error pointer, but the code currently checks that the pointer is > > not NULL. > ...

Re: [PATCH net] ipv4: Fix NULL pointer dereference in ipv4_neigh_lookup()

2019-07-04 Thread David Miller
From: Ido Schimmel Date: Thu, 4 Jul 2019 19:26:38 +0300 > Both ip_neigh_gw4() and ip_neigh_gw6() can return either a valid pointer > or an error pointer, but the code currently checks that the pointer is > not NULL. ... > @@ -447,7 +447,7 @@ static struct neighbour *ipv4_neigh_lookup(const stru

[PATCH net] ipv4: Fix NULL pointer dereference in ipv4_neigh_lookup()

2019-07-04 Thread Ido Schimmel
From: Ido Schimmel Both ip_neigh_gw4() and ip_neigh_gw6() can return either a valid pointer or an error pointer, but the code currently checks that the pointer is not NULL. Fix this by checking that the pointer is not an error pointer, as this can result in a NULL pointer dereference [1]. Specif