From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pablo Neira Ayuso Subject: Re: [PATCH nf-next v4 1/2] netfilter: Fix potential null pointer dereference Date: Fri, 30 Sep 2016 19:41:52 +0200 Message-ID: <20160930174152.GC1176@salvia> References: <1475076915-5920-1-git-send-email-aconole@bytheb.org> <1475076915-5920-2-git-send-email-aconole@bytheb.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netfilter-devel@vger.kernel.org, netdev@vger.kernel.org, Florian Westphal To: Aaron Conole Return-path: Content-Disposition: inline In-Reply-To: <1475076915-5920-2-git-send-email-aconole@bytheb.org> Sender: netdev-owner@vger.kernel.org List-Id: netfilter-devel.vger.kernel.org On Wed, Sep 28, 2016 at 11:35:14AM -0400, Aaron Conole wrote: > It's possible for nf_hook_entry_head to return NULL. If two > nf_unregister_net_hook calls happen simultaneously with a single hook > entry in the list, both will enter the nf_hook_mutex critical section. > The first will successfully delete the head, but the second will see > this NULL pointer and attempt to dereference. > > This fix ensures that no null pointer dereference could occur when such > a condition happens. Applied, thanks Aaron.