From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17E6FC433F5 for ; Sun, 10 Apr 2022 15:42:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240217AbiDJPoI (ORCPT ); Sun, 10 Apr 2022 11:44:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237759AbiDJPoI (ORCPT ); Sun, 10 Apr 2022 11:44:08 -0400 Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [IPv6:2a0a:51c0:0:12e:520::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6433FD33; Sun, 10 Apr 2022 08:41:57 -0700 (PDT) Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1ndZhA-0004Ms-Mb; Sun, 10 Apr 2022 17:41:44 +0200 Date: Sun, 10 Apr 2022 17:41:44 +0200 From: Florian Westphal To: Mark Mielke Cc: netdev@vger.kernel.org, dev@openvswitch.org, Pravin B Shelar , "David S. Miller" , Jakub Kicinski , Paolo Abeni , Pablo Neira Ayuso , stable@vger.kernel.org Subject: Re: [PATCH] openvswitch: Ensure nf_ct_put is not called with null pointer Message-ID: References: <20220409094036.20051-1-mark.mielke@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220409094036.20051-1-mark.mielke@gmail.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Mark Mielke wrote: > A recent commit replaced calls to nf_conntrack_put() with calls > to nf_ct_put(). nf_conntrack_put() permitted the caller to pass > null without side effects, while nf_ct_put() performs WARN_ON() > and proceeds to try and de-reference the pointer. ovs-vswitchd > triggers the warning on startup: > > [ 22.178881] WARNING: CPU: 69 PID: 2157 at include/net/netfilter/nf_conntrack.h:176 __ovs_ct_lookup+0x4e2/0x6a0 [openvswitch] > ... > [ 22.213573] Call Trace: > [ 22.214318] > [ 22.215064] ovs_ct_execute+0x49c/0x7f0 [openvswitch] > ... > Cc: stable@vger.kernel.org > Fixes: 408bdcfce8df ("net: prefer nf_ct_put instead of nf_conntrack_put") Actually, no. As Pablo Neira just pointed out to me Upstream kernel is fine. The preceeding commit made nf_ct_out() a noop when ct is NULL.