From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Pirko Subject: Re: [patch net] mlxsw: spectrum_router: Fix NULL pointer deref Date: Mon, 25 Dec 2017 09:02:54 +0100 Message-ID: <20171225080254.GA1885@nanopsycho> References: <20171225075735.2058-1-jiri@resnulli.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: davem@davemloft.net, idosch@mellanox.com, mlxsw@mellanox.com To: netdev@vger.kernel.org Return-path: Received: from mail-wr0-f178.google.com ([209.85.128.178]:35931 "EHLO mail-wr0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750811AbdLYIC4 (ORCPT ); Mon, 25 Dec 2017 03:02:56 -0500 Received: by mail-wr0-f178.google.com with SMTP id u19so26225157wrc.3 for ; Mon, 25 Dec 2017 00:02:55 -0800 (PST) Content-Disposition: inline In-Reply-To: <20171225075735.2058-1-jiri@resnulli.us> Sender: netdev-owner@vger.kernel.org List-ID: Mon, Dec 25, 2017 at 08:57:35AM CET, jiri@resnulli.us wrote: >From: Ido Schimmel > >When we remove the neighbour associated with a nexthop we should always >refuse to write the nexthop to the adjacency table. Regardless if it is >already present in the table or not. > >Otherwise, we risk dereferencing the NULL pointer that was set instead >of the neighbour. > >Fixes: a7ff87acd995 ("mlxsw: spectrum_router: Implement next-hop routing") >Signed-off-by: Ido Schimmel >Reported-by: Alexander Petrovskiy >Signed-off-by: Jiri Pirko Dave, could you please queue this up for 4.14.y together with "mlxsw: spectrum: Relax sanity checks during enslavement". Thanks!