From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [patch net] rocker: fix possible null pointer dereference in rocker_router_fib_event_work Date: Thu, 01 Feb 2018 09:52:00 -0500 (EST) Message-ID: <20180201.095200.5516558515183077.davem@davemloft.net> References: <20180201112115.1315-1-jiri@resnulli.us> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, mlxsw@mellanox.com To: jiri@resnulli.us Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:44034 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751467AbeBAOwE (ORCPT ); Thu, 1 Feb 2018 09:52:04 -0500 In-Reply-To: <20180201112115.1315-1-jiri@resnulli.us> Sender: netdev-owner@vger.kernel.org List-ID: From: Jiri Pirko Date: Thu, 1 Feb 2018 12:21:15 +0100 > From: Jiri Pirko > > Currently, rocker user may experience following null pointer > derefence bug: > > [ 3.062141] BUG: unable to handle kernel NULL pointer dereference at 00000000000000d0 > [ 3.065163] IP: rocker_router_fib_event_work+0x36/0x110 [rocker] > > The problem is uninitialized rocker->wops pointer that is initialized > only with the first initialized port. So move the port initialization > before registering the fib events. > > Fixes: 936bd486564a ("rocker: use FIB notifications instead of switchdev calls") > Signed-off-by: Jiri Pirko Applied and queued up for -stable, thanks Jiri.