Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2064570pxb; Mon, 12 Apr 2021 13:23:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxhqeJQ3sDjIf9+n2557lfFtt1FbNjZaB7uxuEywSDOeUJSzeOAdcMjRjzR4yCg2TxaX8DH X-Received: by 2002:a05:6402:57:: with SMTP id f23mr30304723edu.323.1618258999663; Mon, 12 Apr 2021 13:23:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618258999; cv=none; d=google.com; s=arc-20160816; b=l9UNWa2p3n6ImcHQpHhjyejSpsfNpdGlB4VFCp9CPY5mk4QF9/tzzARuS0jZajSYOS F7yvClnumbD4sZbplWu10Pnq4ny2D3U1jPw9B1xU7z45w8+3yqRqlEqPS8vkS9Hc/6tF 0kua85SQIQN9YDxCjAp3RHk4YpM6wAOnRQgcyuaCDitNw3VXWAuivi0umKZafhSO4VYF 7SWwTi5x8eeAA6fzfnhEw9qLWPvBlFwjtYzHocXMna8hUjzy5+Clk07bE2rYTy5iJAp4 XwcDe6XIY8t6H/eCpBI4XzxGdXRBQ8hcfQdyPo3v+/gAfJrSOHXDpomnPDKNRHeFcHTO 4/kQ== 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=bD/lENrOqNxvPa/dRMGJEofXElnXEhA5++DZvzsaDwGSI/Kee0HBukBoEXPOAx/2ZX 8dzLRVJ+H9t/nv0PrKNNChhMKAgjBvH1BmRMysqXTU8c/bZ+nSZQ5UKPYKPkdNCjWeD/ NX70lFLhGutNMWQmXUnI4qIB+23y5wykBqvCGvPSptFDgdc1iuQGrFFJqymcFlLV2EL5 Ke+MuO/2UDV0iGlNSKltsosEtyEQR88QkBcJlo7rM62o9rE/rhSRkkb8o21ysU701yV8 fz0PVkcu9+oNR/y38Mb54V+Spctey5ljVQOaaSYXPd0WuaHpRNp/BGZ1Br4J+DwHboVk dDJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dbtGGDKp; 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 gz11si8152039ejb.532.2021.04.12.13.22.56; Mon, 12 Apr 2021 13:23:19 -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=dbtGGDKp; 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 S238656AbhDLI4i (ORCPT + 99 others); Mon, 12 Apr 2021 04:56:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:40892 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238494AbhDLIt6 (ORCPT ); Mon, 12 Apr 2021 04:49:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CF1CE6124A; Mon, 12 Apr 2021 08:49:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618217360; bh=Q+5fEvDj5iAxPrP/ZoaMUXAHNrRsab/qAj7JAHiSKZY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dbtGGDKp5WtxHM5U74+grLrO/Sv9VRPxSNXrY3hNT7OfymIRpX6vnuIn+iG8GxJYs TgppxtIB3VGOsZvboslJr5mA30/G2bD17xJ/y8Ak27BbpLkE1Slt4CgHZBSE7QWq+6 7fb1FaUUgWfFqzQlntQfr6uC1zKtPc81ZF3xMrd4= 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 5.4 098/111] cfg80211: remove WARN_ON() in cfg80211_sme_connect Date: Mon, 12 Apr 2021 10:41:16 +0200 Message-Id: <20210412084007.513443061@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210412084004.200986670@linuxfoundation.org> References: <20210412084004.200986670@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);