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 974ACC6FD1C for ; Sat, 11 Mar 2023 14:21:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230336AbjCKOVn (ORCPT ); Sat, 11 Mar 2023 09:21:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230420AbjCKOVX (ORCPT ); Sat, 11 Mar 2023 09:21:23 -0500 Received: from mail.marcansoft.com (marcansoft.com [212.63.210.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 087CE72BF; Sat, 11 Mar 2023 06:20:10 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sendonly@marcansoft.com) by mail.marcansoft.com (Postfix) with ESMTPSA id 8F0B742625; Sat, 11 Mar 2023 14:19:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=marcan.st; s=default; t=1678544382; bh=K9gl8fahgYUMVFftdPQMDoNmStusBGDJI/NXoxPhu6o=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=tDGxqR5NqPgL2zB++YbolTcp9fLpui6CI9QgypZYnAKvKSPFLGWtT5J8uq7Fp0cr3 2K8k2vlMH9b80XRTWwJ3MHYk7rafN7T9fLGJYUrG7NcnUaUi7Kccjiwwa5wxqrpN3g EzwZ58hpqwF3JxIt7H6OSIdw5IT1GGTP6P/mcHcPS5sNwWwOJtL882tKe36RolVUnB JIBwRQMVVi0NlPeKnDi86DAfxI8YgPoazmmcQGTReFc4IMRAOaLAjewdNRk87w/W3y PvSTaM7mRJNKhskVL7D94KA+yKBAgTqcgmETBylstCjSfDl3JQLfxcTUZbRx1UpO+7 uOsNT2wDRfcGg== From: Hector Martin To: Greg Kroah-Hartman , Johannes Berg , Johannes Berg , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexander Wetzel Cc: Ilya , Janne Grunau , Hans de Goede , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, regressions@lists.linux.dev, asahi@lists.linux.dev, Hector Martin Subject: [PATCH] wifi: cfg80211: Partial revert "wifi: cfg80211: Fix use after free for wext" Date: Sat, 11 Mar 2023 23:19:14 +0900 Message-Id: <20230311141914.24444-1-marcan@marcan.st> X-Mailer: git-send-email 2.35.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This reverts part of commit 015b8cc5e7c4 ("wifi: cfg80211: Fix use after free for wext") This commit broke WPA offload by unconditionally clearing the crypto modes for non-WEP connections. Drop that part of the patch. Fixes: 015b8cc5e7c4 ("wifi: cfg80211: Fix use after free for wext") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/linux-wireless/ZAx0TWRBlGfv7pNl@kroah.com/T/#m11e6e0915ab8fa19ce8bc9695ab288c0fe018edf Signed-off-by: Hector Martin --- net/wireless/sme.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/wireless/sme.c b/net/wireless/sme.c index 28ce13840a88..7bdeb8eea92d 100644 --- a/net/wireless/sme.c +++ b/net/wireless/sme.c @@ -1500,8 +1500,6 @@ int cfg80211_connect(struct cfg80211_registered_device *rdev, connect->key = NULL; connect->key_len = 0; connect->key_idx = 0; - connect->crypto.cipher_group = 0; - connect->crypto.n_ciphers_pairwise = 0; } wdev->connect_keys = connkeys; -- 2.35.1