Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2657210pxb; Thu, 10 Feb 2022 02:35:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJwg6UlL7sL6cKsO8VZrcJuFNyPJ76kKWF2j7TwIptZu1UNI5ImtfloTD4/DxvRi2yhxocfj X-Received: by 2002:a17:903:22c2:: with SMTP id y2mr6865159plg.70.1644489355647; Thu, 10 Feb 2022 02:35:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644489355; cv=none; d=google.com; s=arc-20160816; b=zTm69sMGSaAcRnA9NNzvDfKHq0SyTbrUDkT21pfz3fbxe1sPAou1Qie1v3lBoOVzz+ hlcRuLULBtiNg8BIz4V4Gp26sU1nk1r4OVHgfN+97SwnLeA93vEgbqeIk+jKSE4C6lpM 7hu7khKBRwyvWpMejbYF/+JNVmOTFAWphXvxRwg4eE/LcpsFvs7Kio5T0zTAnNzlFAIR c8iy2oX7/rMe/ZFJDAH9DzbY4IorvwtWamk0Q2J8JUyhMX0vRHIuB+N/p+5JcjwquUAG 2Uw9p5CvdC+MyzylZDi9vv2kEH1xka6C8yTLwIHnMmEtQeej+2D6iEsA32NY7YAXnyFM D//w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:message-id:user-agent:cc:to:references :in-reply-to:from:subject:content-transfer-encoding:mime-version :dkim-signature; bh=9Y3l7jl0REGkIp/VJNY+6jpCBkPJKpz6pR3m42gFffo=; b=mHSZ/ONYnRxZIOGvubrTnBJVEZbjD/Q+oy8K7thGaRfU170A9d29zuPOxKgoLC9pfg 2+FT3uHQDW79mS/FbxCVE6on29X6DRfOD56IUjWP8Ir1O462wzkslJrmGhpPDJS+qOhJ NgpGl2tKtX32I/Ykxghz/jlCd5ZGJ4jCBTM9ETW7bbbkQZfP7pgVd/jN3n+P+iecraF3 BoVbenV3pO7R5Oj2DaCyPfqn8bReOZeJOjm6ozEihcA3+v+CnXT073ky+crMVkReTs31 ZHqPovDPCrTAFGHDK53G6j/dgD8XtlH32w0QiN/QC/eyW0hoHZkbi1+KlCvTTyhAwhcS 8OfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="l0PrDUi/"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g8si1420953plt.310.2022.02.10.02.35.38; Thu, 10 Feb 2022 02:35:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="l0PrDUi/"; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237248AbiBJIQy (ORCPT + 73 others); Thu, 10 Feb 2022 03:16:54 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:53326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237105AbiBJIQw (ORCPT ); Thu, 10 Feb 2022 03:16:52 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EC63109E; Thu, 10 Feb 2022 00:16:54 -0800 (PST) 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 dfw.source.kernel.org (Postfix) with ESMTPS id E05E46128D; Thu, 10 Feb 2022 08:16:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65074C004E1; Thu, 10 Feb 2022 08:16:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1644481013; bh=pY+kYYBMcgXvvd1QLrlQo1EVEtYJtXoEbZCyjGohZH4=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=l0PrDUi/YOlJDb3awfaQpXLyrwOJKeg/EJwZfN8ENdU3lrA/MsZsmizYBxuJLbdFC DQk2rLTIo0xE6Hu3v8wbiwez6hXg7SuR7fG8qxidrQy+dCTxPkc+/hlklyyPzla4Wb OLLoUQt5BF6gnOCW7RLmv3r6ICK3Vdvopmhi76jogVz5wSQoKTrUiOuKuawUGHErsT 0rcmhq5AVdAWhoKpiTc/asL7bK5TYS+2BmW70VEyhj+XGEMy8Tl6LZpo61ONw5zQ+y W2pWf3bXCNmvkzJw0i5s0Ou5qbyxnMVW4F3svNw9Dy4AecZumfIbPDmKCD2oxGqUPP ySRoEwnhB2hsQ== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [PATCH] iwlwifi: fix use-after-free From: Kalle Valo In-Reply-To: <20220208114728.e6b514cf4c85.Iffb575ca2a623d7859b542c33b2a507d01554251@changeid> References: <20220208114728.e6b514cf4c85.Iffb575ca2a623d7859b542c33b2a507d01554251@changeid> To: Johannes Berg Cc: linux-wireless@vger.kernel.org, Johannes Berg , stable@vger.kernel.org, Stefan Agner , Wolfgang Walter , Jason Self , Dominik Behr , =?utf-8?q?Marek_Marczykowski-G=C3=B3recki?= User-Agent: pwcli/0.1.0-git (https://github.com/kvalo/pwcli/) Python/3.7.3 Message-ID: <164448100914.10463.9523338503936670263.kvalo@kernel.org> Date: Thu, 10 Feb 2022 08:16:51 +0000 (UTC) X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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-wireless@vger.kernel.org Johannes Berg wrote: > From: Johannes Berg > > 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 Patch applied to wireless.git, thanks. bea2662e7818 iwlwifi: fix use-after-free -- https://patchwork.kernel.org/project/linux-wireless/patch/20220208114728.e6b514cf4c85.Iffb575ca2a623d7859b542c33b2a507d01554251@changeid/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches