Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp3952102pxb; Mon, 21 Feb 2022 08:59:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJzgarrTmVrP9QIPGx6rpSwp4Z0kLNuHm/NdEu88irxzTeAoLZ6iDHOfKmp2YPyzsl0SLa6Z X-Received: by 2002:a17:903:1210:b0:14d:c2c0:cce6 with SMTP id l16-20020a170903121000b0014dc2c0cce6mr19425993plh.17.1645462779206; Mon, 21 Feb 2022 08:59:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645462779; cv=none; d=google.com; s=arc-20160816; b=a+fQBOazAk3bClrKSEgU3ZbRDO4ovQzJKH3BT6s0qSkEzpTlmlZXAvKRva/UW7x7xW 7g01ioSxgtXHv4CNqLHcLDxbTZ+Beq6VLQCMeHiPdO+boEyGY3Y0KnBjysQ4rPgPKwuW Du/o57aN9z865GqXQAZTXWxNLFlxtp3F68klTm2CJQ6Sy/6xzwKN/ibcj2C1BPRRD7xV zTCrvc1RDFdYlh3gVkzAQSN7BY+aXbZaEo6GOeVMAS2opzQ1UZh0mjgS0s6PBj06XeQn A0mMYl+9w9jMcPw5RHGNB646hmS69I+biQXJ+D7JaUgMmw314hLsH0HgljZJegM+3QsC sC8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=KIC3exnwI36yCWW3TcPU2hrC5f3yYUg8XP7eIXIklTQ=; b=azVupE+uXf5cEKu2vXTjmKn3ANUjWOQQUHIzrfpRT5ukwK5io/tEoZLLyRjY5WL5Ca k7JMcmxvMmzyibT8u10T0CK6JoAZb9GS+q/daUjNyKUBGuTrMIPgoTXJLw7i1///KXq0 W8ZuYvlE/bynwtw3tL7IF4onsf61vtb2+PdSAzBcFX/JhHzfTuAt6za2xAubrpDz0f3+ AinXQ2ea8R51xyIGskqD5prTT4d3yFymGfOj89YGD+oqcYw89e1m32nTnTWN8Sa+cD/7 KzkVoXtupUV4b90CcYo83GZIqz0EWYFqRAngPp5JJ8yR69DFF6Ok1r7846zgjOBP/mtL bpzA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l186si15446654pge.732.2022.02.21.08.59.23; Mon, 21 Feb 2022 08:59:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377814AbiBUOao (ORCPT + 99 others); Mon, 21 Feb 2022 09:30:44 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:39240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358822AbiBUOag (ORCPT ); Mon, 21 Feb 2022 09:30:36 -0500 Received: from wp530.webpack.hosteurope.de (wp530.webpack.hosteurope.de [IPv6:2a01:488:42:1000:50ed:8234::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12E3B1EC7B; Mon, 21 Feb 2022 06:30:13 -0800 (PST) Received: from ip4d144895.dynamic.kabel-deutschland.de ([77.20.72.149] helo=[192.168.66.200]); authenticated by wp530.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) id 1nM9ha-0002vS-2G; Mon, 21 Feb 2022 15:30:10 +0100 Message-ID: <7dce67c2-918e-3553-9dd3-1f59d3d37e05@leemhuis.info> Date: Mon, 21 Feb 2022 15:30:09 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH 5.16 077/227] iwlwifi: fix use-after-free Content-Language: en-BS To: Kalle Valo Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Stefan Agner , Wolfgang Walter , Jason Self , Dominik Behr , =?UTF-8?Q?Marek_Marczykowski-G=c3=b3recki?= , Johannes Berg References: <20220221084934.836145070@linuxfoundation.org> <20220221084937.429986092@linuxfoundation.org> <87h78swggw.fsf@kernel.org> From: Thorsten Leemhuis In-Reply-To: <87h78swggw.fsf@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-bounce-key: webpack.hosteurope.de;regressions@leemhuis.info;1645453813;dabea8c3; X-HE-SMSGID: 1nM9ha-0002vS-2G X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21.02.22 13:29, Kalle Valo wrote: > Thorsten Leemhuis writes: > >> Hi, this is your Linux kernel regression tracker. >> >> On 21.02.22 09:48, Greg Kroah-Hartman wrote: >>> From: Johannes Berg >>> >>> commit bea2662e7818e15d7607d17d57912ac984275d94 upstream. >>> >>> If no firmware was present at all (or, presumably, all of the >>> firmware files failed to parse), we end up unbinding by calling >>> device_release_driver(), which calls remove(), which then in >>> iwlwifi calls iwl_drv_stop(), freeing the 'drv' struct. However >>> the new code I added will still erroneously access it after it >>> was freed. >>> >>> Set 'failure=false' in this case to avoid the access, all data >>> was already freed anyway. >>> >>> Cc: stable@vger.kernel.org >>> Reported-by: Stefan Agner >>> Reported-by: Wolfgang Walter >>> Reported-by: Jason Self >>> Reported-by: Dominik Behr >>> Reported-by: Marek Marczykowski-Górecki >>> Fixes: ab07506b0454 ("iwlwifi: fix leaks/bad data after failed firmware load") >>> Signed-off-by: Johannes Berg >>> Signed-off-by: Kalle Valo >>> Link: >>> https://lore.kernel.org/r/20220208114728.e6b514cf4c85.Iffb575ca2a623d7859b542c33b2a507d01554251@changeid >>> Signed-off-by: Greg Kroah-Hartman >> >> Great to see that you quickly picked up this patch. Once the new stable >> and longterm releases are out on Wednesday, it will fix a regression >> that made it into many stable and longterm kernels nearly four weeks >> earlier. I tracked the issue, which made me we wonder: should I have >> done something differently in this case to get the regression resolved >> more quickly? Should I maybe have suggested to remove the culprit >> temporarily until the fix was merged to mainline? >> >> For context, this is the story of the regression afaics: the change >> ab07506b0454 ("iwlwifi: fix leaks/bad data after failed firmware load") >> was merged for 5.17-rc1 (released on 2022-01-23). Shortly after it was >> backported to several stable/longterm series with new versions released >> on 2022-01-27. It triggered a general protection fault, if the proper >> firmware file was missing. Afaics at least five people reported the >> problem between 2022-02-01 and 2022-02-11 for at least 5.10.y, 5.15.y >> and 5.16.y (some of those reports were on the stable list), which shows >> that such a setup is not that unusual. A fix was posted on 2022-02-08 >> and approved and committed by a maintainer on 2022-02-10. It was then >> merged to mainline on 2022-02-17 (I hope we can find ways to reduce such >> particular timeframes in the future, but that's a different story). > > From mainline point of view there is not really any easy way to make > this faster. There are multiple trees involved and pull requests always > take time (we cannot submit a pull request for every commit sepately), Well, I'm aware of all that, but OTOH I might be missing something, as your reply makes me wonder: what is stopping you from asking Dave/Jakub or even Linus himself to directly pick up a regression fix that obviously bothers multiple people (the handful we known about might be the tip of the iceberg)? Some mailing list posts from Linus iirc indicate something like that is not a big problem for him, if it doesn't happen too often. With such a approach the issue could have vanished a from all our versions a week earlier (if that worth it in this particular case is a different question; same for skipping linux-next, but you accepted the patch on a Thursday, so it could have been in there for one regular work day). Or would that also skip some wireless specific CI that you want to chew on the patch first? The thing is: I noticed how quickly regressions sometimes get fixed when Linus is directly involved somehow, especially in cases where he himself is affected by the issue. Obviously he deserves some special treatment, but OTOH it kinda feels wrong to me when other regression fixes hang around in git tree for weeks before they finally make it to mainline (which is needed to also get them fixed in stable trees). But okay, let's assume for a moment that things can't be sped up, to bring me back to the question that made me write the mail you replied to: Should I (or you/Johannes?) in that case have asked Greg to temporarily revert the culprit in the stable tree until the fix is ready? Ciao, Thorsten