From mboxrd@z Thu Jan 1 00:00:00 1970 From: Phil Sutter Subject: Re: [iproute PATCH] ip-route: Fix segfault with many nexthops Date: Thu, 6 Sep 2018 14:54:05 +0200 Message-ID: <20180906125404.GF20453@orbyte.nwl.cc> References: <20180904171544.9337-1-phil@nwl.cc> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org To: Stephen Hemminger Return-path: Received: from orbyte.nwl.cc ([151.80.46.58]:33006 "EHLO orbyte.nwl.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726308AbeIFR32 (ORCPT ); Thu, 6 Sep 2018 13:29:28 -0400 Content-Disposition: inline In-Reply-To: <20180904171544.9337-1-phil@nwl.cc> Sender: netdev-owner@vger.kernel.org List-ID: 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, > memset(rtnh, 0, sizeof(*rtnh)); > rtnh->rtnh_len = sizeof(*rtnh); > rta->rta_len += rtnh->rtnh_len; > - if (parse_one_nh(n, r, rta, rtnh, &argc, &argv)) { > + if (parse_one_nh(n, r, rta, 1024, rtnh, &argc, &argv)) { > fprintf(stderr, "Error: cannot parse nexthop\n"); > exit(-1); > } > rtnh = RTNH_NEXT(rtnh); > } > > + return 0; > + This line got added by accident, I'll respin. Sorry, Phil