Re: [PATCH net-next v2] ipv6: Error when route does not have any valid nexthops

2019-06-22 Thread David Miller
From: Ido Schimmel Date: Thu, 20 Jun 2019 12:10:21 +0300 > From: Ido Schimmel > > When user space sends invalid information in RTA_MULTIPATH, the nexthop > list in ip6_route_multipath_add() is empty and 'rt_notif' is set to > NULL. > > The code that emits the in-kernel notifications does not c

Re: [PATCH net-next v2] ipv6: Error when route does not have any valid nexthops

2019-06-20 Thread David Ahern
On 6/20/19 3:10 AM, Ido Schimmel wrote: > From: Ido Schimmel > > When user space sends invalid information in RTA_MULTIPATH, the nexthop > list in ip6_route_multipath_add() is empty and 'rt_notif' is set to > NULL. > > The code that emits the in-kernel notifications does not check for this > con

Re: [PATCH net-next v2] ipv6: Error when route does not have any valid nexthops

2019-06-20 Thread Ido Schimmel
On Thu, Jun 20, 2019 at 11:22:03AM +0200, Jiri Pirko wrote: > Thu, Jun 20, 2019 at 11:10:21AM CEST, ido...@idosch.org wrote: > >+if (list_empty(&rt6_nh_list)) { > >+NL_SET_ERR_MSG(extack, > >+ "Invalid nexthop configuration - no valid > >nexthops"); > > N

Re: [PATCH net-next v2] ipv6: Error when route does not have any valid nexthops

2019-06-20 Thread Jiri Pirko
Thu, Jun 20, 2019 at 11:10:21AM CEST, ido...@idosch.org wrote: >From: Ido Schimmel > >When user space sends invalid information in RTA_MULTIPATH, the nexthop >list in ip6_route_multipath_add() is empty and 'rt_notif' is set to >NULL. > >The code that emits the in-kernel notifications does not chec

[PATCH net-next v2] ipv6: Error when route does not have any valid nexthops

2019-06-20 Thread Ido Schimmel
From: Ido Schimmel When user space sends invalid information in RTA_MULTIPATH, the nexthop list in ip6_route_multipath_add() is empty and 'rt_notif' is set to NULL. The code that emits the in-kernel notifications does not check for this condition, which results in a NULL pointer dereference [1].