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 47A14C433FE for ; Fri, 25 Nov 2022 07:53:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229778AbiKYHxS (ORCPT ); Fri, 25 Nov 2022 02:53:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229493AbiKYHxQ (ORCPT ); Fri, 25 Nov 2022 02:53:16 -0500 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64B2829826; Thu, 24 Nov 2022 23:53:16 -0800 (PST) Received: from canpemm500007.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4NJRt05jbgzmW9R; Fri, 25 Nov 2022 15:52:40 +0800 (CST) Received: from [10.174.179.215] (10.174.179.215) by canpemm500007.china.huawei.com (7.192.104.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 25 Nov 2022 15:53:14 +0800 Subject: Re: [PATCH net] net: hsr: Fix potential use-after-free To: Paolo Abeni , , , , CC: , References: <20221123063057.25952-1-yuehaibing@huawei.com> From: YueHaibing Message-ID: <250b2e18-13bd-b0d5-8117-112ffc42b55a@huawei.com> Date: Fri, 25 Nov 2022 15:53:13 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.179.215] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To canpemm500007.china.huawei.com (7.192.104.62) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/11/24 16:53, Paolo Abeni wrote: > Hello, > > On Wed, 2022-11-23 at 14:30 +0800, YueHaibing wrote: >> The skb is delivered to netif_rx() which may free it, after calling this, >> dereferencing skb may trigger use-after-free. >> >> Fixes: f266a683a480 ("net/hsr: Better frame dispatch") >> Signed-off-by: YueHaibing > > The code looks good, but the above is not the commit introducing the > issue, it just move the netif_rx() and later skb access from somewhere > else. > > Please go deeper in git history and find the change that originated the> issue. Ok, will dig it. > > Thanks, > > Paolo > > . >