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 7C9F0C43334 for ; Tue, 12 Jul 2022 03:39:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229760AbiGLDi7 (ORCPT ); Mon, 11 Jul 2022 23:38:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229476AbiGLDi6 (ORCPT ); Mon, 11 Jul 2022 23:38:58 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4246711A31 for ; Mon, 11 Jul 2022 20:38:57 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id F01E9B81648 for ; Tue, 12 Jul 2022 03:38:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 34AEAC3411E; Tue, 12 Jul 2022 03:38:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657597134; bh=q4Yku20FWRL/AX9vTxKZM+7Tt7fNYSI7novuX8Q7HN8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=bsFHtELri0dS4AsXqNsrTrW8mHSYL7zzHawWD4q96+cYnlpGp7y0fIoZHvVF5v/q1 aa7UKHvOOST2qft1q/D5BXqLUZUM+jhiCXueIs5PO4FkfT32yJTwY0EdZchXHdh81g jAJoQyPV+aQo+XM5xEfRZKPp2w6U6Iq5apPJ4WDYHn+BzzJWElgU/C6oUSV73IYeQi fySco844YI14DUfFUUrpNtjLwVfWEcfb0J4jsjS1qlG9w2cuizbnE2uWggQs5B4WUF uZ3ERsjXIYmVtikquamLbYrP4NZViZPwAgrqfO9jY1bModd54FKPGxnbNz8sz8lZ6X jQvhpLNoILqbw== Date: Mon, 11 Jul 2022 20:38:53 -0700 From: Jakub Kicinski To: =?UTF-8?B?w43DsWlnbw==?= Huguet Cc: ecree.xilinx@gmail.com, habetsm.xilinx@gmail.com, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, netdev@vger.kernel.org, Yanghang Liu Subject: Re: [PATCH net] sfc: fix use after free when disabling sriov Message-ID: <20220711203853.72f7565d@kernel.org> In-Reply-To: <20220711134520.10466-1-ihuguet@redhat.com> References: <20220711134520.10466-1-ihuguet@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, 11 Jul 2022 15:45:20 +0200 =C3=8D=C3=B1igo Huguet wrote: > Use after free is detected by kfence when disabling sriov. What was read > after being freed was vf->pci_dev: it was freed from pci_disable_sriov > and later read in efx_ef10_sriov_free_vf_vports, called from > efx_ef10_sriov_free_vf_vswitching. >=20 > Set the pointer to NULL at release time to not trying to read it later. Please add a Fixes tag and repost. Does ef100 need the same fix? :(