Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2198020imm; Mon, 28 May 2018 03:45:49 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqMswiQI6LfO0ZPcYkYMbWlFtfGOJWF/kk/qGNdLQ4SWUPcYVJk1BsfMBVPrUHfYdLz8Snj X-Received: by 2002:a65:4488:: with SMTP id l8-v6mr10319291pgq.258.1527504349449; Mon, 28 May 2018 03:45:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527504349; cv=none; d=google.com; s=arc-20160816; b=zay8Ls50ZaYe4xgBicqXNFk8zpVqlHAOhTN8hTGbx7Gvm5pL/IaJbrlLqoH+c8e6+z S9XtLTcEoAd6sPMDRWaWXiroH1s8LrVv9kTtMj0Ad8ciIxQhDYIML6zjJxyZIAIV/8EC wtooDf6qxSdTsxpUilUQsu8epvfCRU00uMl3U8qO1/WLPvANb+J6QkPX3mKN7gDE2TFL oKMKcdRB7PEsDXxO4bo+a4SroLc6wjZiSt3TZGKG9iMI1RJUf7OR0h+eJsiTSyDtL9+3 /7sdjyE9j3qH7ZCWGTkmAE1jLu1AuDZlRwaUnUHxvyjT5J3vCAiLuSwKfUEolnNSF/dn l1Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=s8idq7hOjSasAV6u63oO1CglnScqbmKP1qRC+I0QYh4=; b=Zi2cACYfUbE34OB4ZsehzZ/jVqhjSZUp2wPR1ljVaKxUvtp99kHTSuUpw2hqaZD6gg iNFC5MLBhelaRRI9EFqHL943l0wrFXB3Te2LANQnlFrwt7xTMKjgO9f0Bt97+oUhy+vp Q34nAza6VxZci/NrE2M0gSNCI6KElPo1qL118YQLLDUxa8nQBY7moTq/fFOdCBkhBMeb g8jvA8dgm6YKOTQftE1hYebGOC0M9FOdv/NNDDNAT15aVgplY4CDk/wpjzbpztzmbnBD JdkLhvv1dgQ/CBH0L3CwSftSEeCNwxeSmsRPemdu8XT6mxnyLUBREA08uFrW5t3IfCR5 nncg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fsv8XFFq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c27-v6si157525pgn.320.2018.05.28.03.45.34; Mon, 28 May 2018 03:45:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=fsv8XFFq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1033644AbeE1Kp1 (ORCPT + 99 others); Mon, 28 May 2018 06:45:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:35854 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937621AbeE1KpS (ORCPT ); Mon, 28 May 2018 06:45:18 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 92D07204EE; Mon, 28 May 2018 10:45:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527504318; bh=eDvgkXHqRLhHpJYlpN32+kOM28c2Yx/7SrQDehPdh+I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fsv8XFFqEHTRKWsbDyzTVCZ6tMHfd2UFiqi6lhf3Af2i+uO1Bnx0v/MpPtnfBAsKd yci8ne5qtt4ALv0Q92JJgQXUCDACMKA9foskdaqR7gNNI1o9USXb8dFjmVApMtki7j YYPD5LLs+iVz5/rTf0k8R21on1Xc3xjYjUxDvuUs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Avraham Stern , Luca Coelho , Johannes Berg , Sasha Levin Subject: [PATCH 4.14 094/496] cfg80211: clear wep keys after disconnection Date: Mon, 28 May 2018 11:57:59 +0200 Message-Id: <20180528100323.834602073@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100319.498712256@linuxfoundation.org> References: <20180528100319.498712256@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Avraham Stern [ Upstream commit 3027a8e799b20fc922496a12f8ad2f9f36a8a696 ] When a low level driver calls cfg80211_disconnected(), wep keys are not cleared. As a result, following connection requests will fail since cfg80211 internal state shows a connection is still in progress. Fix this by clearing the wep keys when disconnecting. Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- net/wireless/sme.c | 2 ++ 1 file changed, 2 insertions(+) --- a/net/wireless/sme.c +++ b/net/wireless/sme.c @@ -989,6 +989,8 @@ void __cfg80211_disconnected(struct net_ wdev->current_bss = NULL; wdev->ssid_len = 0; wdev->conn_owner_nlportid = 0; + kzfree(wdev->connect_keys); + wdev->connect_keys = NULL; nl80211_send_disconnected(rdev, dev, reason, ie, ie_len, from_ap);