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 36795C433FE for ; Wed, 8 Dec 2021 10:51:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231787AbhLHKyy (ORCPT ); Wed, 8 Dec 2021 05:54:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229448AbhLHKyx (ORCPT ); Wed, 8 Dec 2021 05:54:53 -0500 Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [IPv6:2a0a:51c0:0:12e:520::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3AA5EC061746; Wed, 8 Dec 2021 02:51:22 -0800 (PST) Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1muuXZ-0006mK-LV; Wed, 08 Dec 2021 11:51:13 +0100 Date: Wed, 8 Dec 2021 11:51:13 +0100 From: Florian Westphal To: David Ahern Cc: Andrea Mayer , Andrea Righi , "David S. Miller" , Hideaki YOSHIFUJI , David Ahern , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Ahmed Abdelsalam , Paolo Lungaroni , Stefano Salsano Subject: Re: [PATCH] ipv6: fix NULL pointer dereference in ip6_output() Message-ID: <20211208105113.GE30918@breakpoint.cc> References: <20211206163447.991402-1-andrea.righi@canonical.com> <20211208012102.844ec898c10339e99a69db5f@uniroma2.it> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org David Ahern wrote: > On 12/7/21 5:21 PM, Andrea Mayer wrote: > > + IP6CB(skb)->iif = skb->skb_iif; > > [...] > > > > What do you think? > > > > I like that approach over the need for a fall back in core ipv6 code. What if the device is removed after ->iif assignment and before dev lookup?