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

2018-09-10 Thread Stephen Hemminger
On Thu, 6 Sep 2018 15:31:51 +0200 Phil Sutter wrote: > 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

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

2018-09-06 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