Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1594393pxb; Mon, 12 Apr 2021 01:46:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwf5ilI0JtDFL9nssBB3lQVUFimFtuyIouFhMfaDzFrrkPhn7EO9Ux/axOgXRXYLZYZRWdr X-Received: by 2002:a17:90b:4a07:: with SMTP id kk7mr27543141pjb.165.1618217183670; Mon, 12 Apr 2021 01:46:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618217183; cv=none; d=google.com; s=arc-20160816; b=eJYb4ENlXPwAq+yOyfdV4zKEnT/PN7FeE23G/Lkesm3ZKDSb9YIjeJi3sQzcEnSF2/ HUgJdXC7qjBJHbsua5w+fi/5l64vxxULrBSS2rT3XrzaQPzWCoqYf5gTvDhPxOBgzaPq fjM9XG+tuplkAli4lHUifO8RcMAKdDBJY0IcDmQIVjKJUFOFY95eWtVNe2szr1Cj0QEp lZyhY2l6Ey8AV0kD1o/bN1OUe9zWB6Pzr+xn9s0zcKfv8RGo7UdpMkw/OntiTpwWt7va IkvWfIXrG+7nw/zRAHH99U8xTEfFqMgzmIrKZHSWS5j73JSyDccjA6XZ7HgmAFiTGa1p rHbg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=wGyUTzOBkcIlGGodffZU2UZsU0AWrAmVMcP2CErS4T0=; b=UrAqMvF6AUKAF8fDJprOrwMIAPUlaAyW3HdSiy1Ei0Hzck8ecWgviO0hHhkr2Jnfls 08eimDzHdGp4McJsN3pFdCO4AKauUThQ9+IHWN/HK7WPiNXU+//h6Mv2KMaYAl5p2e/F az/utn+gqn9k/4oKxKXnIF3wgAm9XsGJ4KF5sfLQmSdVF2LLjJ1QqCwZA5TBhuKgakhh ZoGLOxAI82Zv5qT3u4FEFOK+nY/AtN6Bp+FeF+mqmxPBZfSfOIFKoKXORHjp3IxYDn5P LNYAf44zFqbhD3vdO1iMZF4zmfKJCHzRV0+lD1yUwllRyUdS+kps1xBLbxssbwatlS9o d3tQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IToNrx1I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v4si12670520plg.356.2021.04.12.01.46.11; Mon, 12 Apr 2021 01:46:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=IToNrx1I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237642AbhDLIpQ (ORCPT + 99 others); Mon, 12 Apr 2021 04:45:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:36662 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237673AbhDLIod (ORCPT ); Mon, 12 Apr 2021 04:44:33 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 53FF261243; Mon, 12 Apr 2021 08:44:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618217055; bh=Q+5fEvDj5iAxPrP/ZoaMUXAHNrRsab/qAj7JAHiSKZY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IToNrx1I5YgaBx0eFDe8Goqq4bqfufZJqA89+hr0RfIQvN0BzDnCb6QePWVAxGD1s aEPtFMQgUCJxvWC/IPkZLsRGPopGPRhtSssxxELCpUOInqqNh3ULosYLHPw7yfOxKt 2JiK5GmtsMEjgx9YWB4HXHGrMNz73Rn+hQDhQEMw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, syzbot+5f9392825de654244975@syzkaller.appspotmail.com, Du Cheng , Johannes Berg Subject: [PATCH 4.19 53/66] cfg80211: remove WARN_ON() in cfg80211_sme_connect Date: Mon, 12 Apr 2021 10:40:59 +0200 Message-Id: <20210412083959.845685440@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210412083958.129944265@linuxfoundation.org> References: <20210412083958.129944265@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Du Cheng commit 1b5ab825d9acc0f27d2f25c6252f3526832a9626 upstream. A WARN_ON(wdev->conn) would trigger in cfg80211_sme_connect(), if multiple send_msg(NL80211_CMD_CONNECT) system calls are made from the userland, which should be anticipated and handled by the wireless driver. Remove this WARN_ON() to prevent kernel panic if kernel is configured to "panic_on_warn". Bug reported by syzbot. Reported-by: syzbot+5f9392825de654244975@syzkaller.appspotmail.com Signed-off-by: Du Cheng Link: https://lore.kernel.org/r/20210407162756.6101-1-ducheng2@gmail.com Signed-off-by: Johannes Berg Signed-off-by: Greg Kroah-Hartman --- net/wireless/sme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/wireless/sme.c +++ b/net/wireless/sme.c @@ -530,7 +530,7 @@ static int cfg80211_sme_connect(struct w cfg80211_sme_free(wdev); } - if (WARN_ON(wdev->conn)) + if (wdev->conn) return -EINPROGRESS; wdev->conn = kzalloc(sizeof(*wdev->conn), GFP_KERNEL);