Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752289AbdFUVlK (ORCPT ); Wed, 21 Jun 2017 17:41:10 -0400 Received: from mail-oi0-f47.google.com ([209.85.218.47]:35689 "EHLO mail-oi0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751108AbdFUVlJ (ORCPT ); Wed, 21 Jun 2017 17:41:09 -0400 MIME-Version: 1.0 In-Reply-To: <20170621.173655.1945994342723484710.davem@davemloft.net> References: <1498068137-3550-1-git-send-email-michael.j.dilmore@gmail.com> <21644.1498070000@famine> <20170621.173655.1945994342723484710.davem@davemloft.net> From: Michael D Date: Wed, 21 Jun 2017 22:41:07 +0100 Message-ID: Subject: Re: [PATCH] Convert BUG_ON to WARN_ON in bond_options.c To: David Miller Cc: Jay Vosburgh , Veaceslav Falico , Andy Gospodarek , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Joe Perches Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 545 Lines: 18 I don't think you can stop it being dereferenced... you just need to prevent an attacker from exploiting the null pointer dereference vulnerability right? And this is done by returning the function right away? On 21 June 2017 at 22:36, David Miller wrote: > From: Michael D > Date: Wed, 21 Jun 2017 22:35:56 +0100 > >> How do we actually stop a null pointer being dereferenced here? > > Maybe that's why it's a BUG_ON(), there is no reasonable way > to continue if the pointer is NULL. >