Re: [iproute PATCH] ip-route: Fix segfault with many nexthops

2018-09-06 Thread Phil Sutter
Hi, On Tue, Sep 04, 2018 at 07:15:44PM +0200, Phil Sutter wrote: [...] > diff --git a/ip/iproute.c b/ip/iproute.c > index 30833414a3f7f..9e5ae48c0715c 100644 > --- a/ip/iproute.c > +++ b/ip/iproute.c [...] > @@ -1036,15 +1044,18 @@ static int parse_nexthops(struct nlmsghdr *n, struct > rtmsg *r,

[iproute PATCH] ip-route: Fix segfault with many nexthops

2018-09-04 Thread Phil Sutter
It was possible to crash ip-route by adding an IPv6 route with 37 nexthop statements. A simple reproducer is: | for i in `seq 37`; do | nhs="nexthop via ::$i "$nhs | done | ip -6 route add ::/64 $nhs The related code was broken in multiple ways: * parse_one_nh() assumed that rta po