From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2CA20C10F14 for ; Thu, 3 Oct 2019 16:00:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EE047207FF for ; Thu, 3 Oct 2019 16:00:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570118425; bh=fsyH0ce6J7i4xp0YrIBg7PCkiz/4+XeUMbByYMJ7klc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=zBUL62HCECE+K7O0AACqW5DgtxcS5DEzshmIMiHV64EqpnshPMBHNTpRnfsw/p1av sdvpcWns3zMrv0V8N01xdebIRwa84sowSiQ8KAE5D1E9oZ9iYSMLvHODnLn0fYwKXz nD69Wv6FIu5pRuf2GjTTxA+JUVoUiePXNowcsYy4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731562AbfJCQAY (ORCPT ); Thu, 3 Oct 2019 12:00:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:43996 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731545AbfJCQAT (ORCPT ); Thu, 3 Oct 2019 12:00:19 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 54640207FF; Thu, 3 Oct 2019 16:00:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570118418; bh=fsyH0ce6J7i4xp0YrIBg7PCkiz/4+XeUMbByYMJ7klc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c1MkSEzD5hGqUFV5uulsxpVtk8ku84rWJ7qoz3zOd6X9RvnPZgGmhLaY5vPnkUX2W LtNYKrzEP7B9Fcf0mFyKtpeH3aYZwhlTx0R0EdhsgLz1nVm9HxzF9GcZuFIksFA1nu oEYkDyxcqbCVDHY/yzWpanqA4gqMR9ZxQfas1B8Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Denis Kenzior , Johannes Berg Subject: [PATCH 4.4 89/99] cfg80211: Purge frame registrations on iftype change Date: Thu, 3 Oct 2019 17:53:52 +0200 Message-Id: <20191003154339.189378717@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154252.297991283@linuxfoundation.org> References: <20191003154252.297991283@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Denis Kenzior commit c1d3ad84eae35414b6b334790048406bd6301b12 upstream. Currently frame registrations are not purged, even when changing the interface type. This can lead to potentially weird situations where frames possibly not allowed on a given interface type remain registered due to the type switching happening after registration. The kernel currently relies on userspace apps to actually purge the registrations themselves, this is not something that the kernel should rely on. Add a call to cfg80211_mlme_purge_registrations() to forcefully remove any registrations left over prior to switching the iftype. Cc: stable@vger.kernel.org Signed-off-by: Denis Kenzior Link: https://lore.kernel.org/r/20190828211110.15005-1-denkenz@gmail.com Signed-off-by: Johannes Berg Signed-off-by: Greg Kroah-Hartman --- net/wireless/util.c | 1 + 1 file changed, 1 insertion(+) --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -974,6 +974,7 @@ int cfg80211_change_iface(struct cfg8021 } cfg80211_process_rdev_events(rdev); + cfg80211_mlme_purge_registrations(dev->ieee80211_ptr); } err = rdev_change_virtual_intf(rdev, dev, ntype, flags, params);