From: Nikolay Aleksandrov <niko...@cumulusnetworks.com> Date: Sat, 22 Aug 2020 15:06:36 +0300
> Currently the nexthop code will use an empty NHA_GROUP attribute, but it > requires at least 1 entry in order to function properly. Otherwise we > end up derefencing null or random pointers all over the place due to not > having any nh_grp_entry members allocated, nexthop code relies on having at > least the first member present. Empty NHA_GROUP doesn't make any sense so > just disallow it. > Also add a WARN_ON for any future users of nexthop_create_group(). ... > CC: David Ahern <dsah...@gmail.com> > Fixes: 430a049190de ("nexthop: Add support for nexthop groups") > Reported-by: syzbot+a61aa19b0c14c8770...@syzkaller.appspotmail.com > Signed-off-by: Nikolay Aleksandrov <niko...@cumulusnetworks.com> Applied and queued up for -stable, thanks.