Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp631137ybt; Fri, 19 Jun 2020 09:45:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzYQ+mhH3sTBG6KeMveYO+Bj1D0xP4wL0ovRF1Bwk2LoGQ1X6mTo72jRFhxs4s3t/dBa9TF X-Received: by 2002:a17:906:cd06:: with SMTP id oz6mr4718827ejb.434.1592585135558; Fri, 19 Jun 2020 09:45:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592585135; cv=none; d=google.com; s=arc-20160816; b=MX4mH2NnT6BTYoZQRnI1ihFWaPT7wXUhKvtIIpxqhe+Y9VHCVETyWB1jOFGe+qDcD+ p1b3meDePkWCYdBQ1ZClrr0e3JCbAZW0/g5Ub0HgXnHLN5XrXaBEWjJQ7KnGAql33Fht sTONR4AFdXqaQimEcHGa5m/vqyBH+j15glkqdm7V1pVd6hNIM2jGKmo8KOe37Pt6ggQy uVaSbQ4edzBsgZsHLPODDLNWvyEBw22gJpD/yzS7IqXXnrMaZWDvZ9jCwue250kj3vMi UW8bnrg6OGdl88nmdF0KzLHSAbc3GYEE9DTY0qGCq3dOppMJjotcq1Eby2vtaTjNNbF8 Nk7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=FwA5SUPKWSLNGY1xgKvjC6IEdfiVmtBC82GvLkdBaZU=; b=myKzQG4K2IYyv8+pgehZN8N8gdYhYy+vaySADRTQd1oTiyjbg2eswof2A5IdM6t56n aceRPl62n8OTCsr2MYVdkW0WuKwjBUEIrAbsZCBhrJ0JNtTNvCI2g+xhXT9YZvxH7bz2 EvnjYOF8hIv1ttMxryF5oHKhrkGPZBVaX9z7H33D0FW3M5Ly/2hYNrC6akYMbUW3Smyy LAZBdLmzx+zNcsVZQkLxk1pcVDcNLtl9b+VSc8y/GnV/zQnGIOl7mtUHeRs5d86iV6C2 bfeYzRLnzYWSkMSknSnaoU0GYfGTK40JmQjzSYR7MRWJidcFCICL8R+ETXl69hNgK8MA kYWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UNzGcQ2A; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i12si4427775edq.423.2020.06.19.09.45.13; Fri, 19 Jun 2020 09:45:35 -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=@kernel.org header.s=default header.b=UNzGcQ2A; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388564AbgFSOoX (ORCPT + 99 others); Fri, 19 Jun 2020 10:44:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:35272 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388531AbgFSOoA (ORCPT ); Fri, 19 Jun 2020 10:44:00 -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 77F6F2168B; Fri, 19 Jun 2020 14:43:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592577840; bh=tQhxigQbmQOKnMbx5j51NiN66GZ0gOKoylnatGUazao=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UNzGcQ2AP1NE7N7RyIog4lBTl3ylQBrK3TjOLanHgiwTT0GeZUK34GRBzOGfikn+7 lt/gxOdD19JvmeNWI6yR9kX4WXFveUhsgsY3sKo1kG3ZZHI5Fopc3O1hjaDbu4UaBU KJtxuIei7zUXZGyP98q8CHiEFtlGlvGVpti9KPU8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Larry Finger , Kalle Valo Subject: [PATCH 4.9 110/128] b43legacy: Fix case where channel status is corrupted Date: Fri, 19 Jun 2020 16:33:24 +0200 Message-Id: <20200619141625.965539385@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200619141620.148019466@linuxfoundation.org> References: <20200619141620.148019466@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: Larry Finger commit ec4d3e3a054578de34cd0b587ab8a1ac36f629d9 upstream. This patch fixes commit 75388acd0cd8 ("add mac80211-based driver for legacy BCM43xx devices") In https://bugzilla.kernel.org/show_bug.cgi?id=207093, a defect in b43legacy is reported. Upon testing, thus problem exists on PPC and X86 platforms, is present in the oldest kernel tested (3.2), and has been present in the driver since it was first added to the kernel. The problem is a corrupted channel status received from the device. Both the internal card in a PowerBook G4 and the PCMCIA version (Broadcom BCM4306 with PCI ID 14e4:4320) have the problem. Only Rev, 2 (revision 4 of the 802.11 core) of the chip has been tested. No other devices using b43legacy are available for testing. Various sources of the problem were considered. Buffer overrun and other sources of corruption within the driver were rejected because the faulty channel status is always the same, not a random value. It was concluded that the faulty data is coming from the device, probably due to a firmware bug. As that source is not available, the driver must take appropriate action to recover. At present, the driver reports the error, and them continues to process the bad packet. This is believed that to be a mistake, and the correct action is to drop the correpted packet. Fixes: 75388acd0cd8 ("add mac80211-based driver for legacy BCM43xx devices") Cc: Stable Signed-off-by: Larry Finger Reported-and-tested by: F. Erhard Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200407190043.1686-1-Larry.Finger@lwfinger.net Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/broadcom/b43legacy/xmit.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/net/wireless/broadcom/b43legacy/xmit.c +++ b/drivers/net/wireless/broadcom/b43legacy/xmit.c @@ -571,6 +571,7 @@ void b43legacy_rx(struct b43legacy_wldev default: b43legacywarn(dev->wl, "Unexpected value for chanstat (0x%X)\n", chanstat); + goto drop; } memcpy(IEEE80211_SKB_RXCB(skb), &status, sizeof(status));