From patchwork Sat Mar 11 14:19:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hector Martin X-Patchwork-Id: 68124 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp314502wrd; Sat, 11 Mar 2023 06:44:25 -0800 (PST) X-Google-Smtp-Source: AK7set8sZxGwxGyoiDRay/9cVT3gIETm50C+huVU7x7Aaopjj0enng8tYwmbWVlDFcGBjm6V9UOe X-Received: by 2002:a05:6a20:9384:b0:ce:521b:f542 with SMTP id x4-20020a056a20938400b000ce521bf542mr9861626pzh.17.1678545865285; Sat, 11 Mar 2023 06:44:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678545865; cv=none; d=google.com; s=arc-20160816; b=PNSal2X4mltJJBJ7/65Flh0SoLXBFxwcgRiEYsxbw1eFxEBn/rKLUfWnLQo+RMC0/T 47lAHZo4YFbkfIsVxVW9HMyb/nP6InQZK5nix71+9oCKYCX3JwDE6znaZS/wpQAikwwk zJ/SbCtkjzdLeC4bL4VsBPi+yax2OhtEyFmQIOmaUdbdLxSpHVGdzKPIUeCc7RDI0mDB 11AUdyjr/VklJlEMpfKssrzaPaXBbX5fjsELZify79efayUx4u+NCZyDXWKeURfJnf3X RdNJhxjBXxkvPYHLpc8/7LjFqHuOF9nayrRlaFOfAF8fJLRF+Lt7SM/AOBc/2w3YLV4t NEGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Salo+7sDymxPyAkD4EA96K1W1xPgf6H7RN9et4JmQ7M=; b=Et9vHp0pfrj6+uVVYkYkkGqbN3+pcwKy5mNRFMu5z8P4768FVbnHSqEaskGphQk44T AkwHL4iqVbNxTQcr7mjEWmrWq+qrcA09M8e3qVyP8IM9SHWRcfjUxxjuhpQbpLsAp6de /8YMc17mLBlp+Wjg+M+VULiyDuYs4i+xO3ODdyoY/L8g6f0eLsNChfrBVaz3UncCB7o6 A8VmrxzuX3dhnzU989TXtyNcwQ52wVFoZQz7qszJ6KzYEWivdX0YYK7PkhPyTOp7GCOZ w+zEkUo1QJiLzYPnUFf8/IaXVWq1Gh222ZYYLQtF6C999OvWhSJuSoN051AnLZg6psxC K4DQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marcan.st header.s=default header.b=tDGxqR5N; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=marcan.st Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s26-20020aa78bda000000b0058802fab480si2111903pfd.324.2023.03.11.06.44.10; Sat, 11 Mar 2023 06:44:25 -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; dkim=pass header.i=@marcan.st header.s=default header.b=tDGxqR5N; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=marcan.st Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230353AbjCKOVo (ORCPT + 99 others); Sat, 11 Mar 2023 09:21:44 -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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760082568485150501?= X-GMAIL-MSGID: =?utf-8?q?1760082909353946227?= 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 Tested-by: Janne Grunau --- net/wireless/sme.c | 2 -- 1 file changed, 2 deletions(-) -- 2.35.1 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;