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 X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2BF28C56202 for ; Sat, 21 Nov 2020 22:23:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F13EF20936 for ; Sat, 21 Nov 2020 22:23:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728600AbgKUWW7 (ORCPT ); Sat, 21 Nov 2020 17:22:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728498AbgKUWW7 (ORCPT ); Sat, 21 Nov 2020 17:22:59 -0500 Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [IPv6:2a0a:51c0:0:12e:520::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15C36C0613CF; Sat, 21 Nov 2020 14:22:59 -0800 (PST) Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1kgbHN-0007bJ-4S; Sat, 21 Nov 2020 23:22:49 +0100 Date: Sat, 21 Nov 2020 23:22:49 +0100 From: Florian Westphal To: Cong Wang Cc: netdev@vger.kernel.org, Cong Wang , liuzx@knownsec.com, Florian Westphal , Edward Cree , stable@vger.kernel.org, Greg Kroah-Hartman Subject: Re: [Patch stable] netfilter: clear skb->next in NF_HOOK_LIST() Message-ID: <20201121222249.GU15137@breakpoint.cc> References: <20201121034317.577081-1-xiyou.wangcong@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201121034317.577081-1-xiyou.wangcong@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org Cong Wang wrote: > From: Cong Wang > > NF_HOOK_LIST() uses list_del() to remove skb from the linked list, > however, it is not sufficient as skb->next still points to other > skb. We should just call skb_list_del_init() to clear skb->next, > like the rest places which using skb list. > > This has been fixed in upstream by commit ca58fbe06c54 > ("netfilter: add and use nf_hook_slow_list()"). Thanks Cong, agree with this change, afaics its applicable to 4.19.y and 5.4.y.