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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A294EC433F5 for ; Fri, 28 Jan 2022 14:07:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244057AbiA1OHT (ORCPT ); Fri, 28 Jan 2022 09:07:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240958AbiA1OHQ (ORCPT ); Fri, 28 Jan 2022 09:07:16 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C85A3C061714 for ; Fri, 28 Jan 2022 06:07:15 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 70E4DB825AC for ; Fri, 28 Jan 2022 14:07:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 05CC8C340E0; Fri, 28 Jan 2022 14:07:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643378833; bh=iTx44YywEliBZo6Poi8GGJmYALujgboJLbX5CQsNvq8=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=fF6G5Sg1jtLIvAsXBxCUcfPgVAGVzXPmvaOUgylPFX3KXqCbjnctQ3RMp4MxpVt/H wALln2c9kVn8B1PDayQN1/XJ8ifOIx7IzEUP3IBxFt6OkquXhY7mrWlNxydOH3t5ps s1U8AdWbHARLeWQDNWpRGjVvXRilV0+BElGjWxQEKLw2G4zGdOyxrbE9CU+eJaP4Bt U0M4VMXAp+mQ4xIgnSscqThFEtRvpZacdwRGLads56LKFxscvHJloI7RB7U73DlYUX mju6USZGzU443yRlX8cIRJtzT3tlkELIEJe6vW0xDRJbRxa5NJ1DTCxGZROfvxecLA Kw5vfD0Xb07lw== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH] brcmfmac: firmware: Fix crash in brcm_alt_fw_path From: Kalle Valo In-Reply-To: <20220118154514.3245524-1-phil@raspberrypi.com> References: <20220118154514.3245524-1-phil@raspberrypi.com> To: Phil Elwell Cc: Arend van Spriel , Chung-hsien Hsu , "David S. Miller" , Jakub Kicinski , Linus Walleij , Phil Elwell , linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, SHA-cyfmac-dev-list@infineon.com User-Agent: pwcli/0.1.0-git (https://github.com/kvalo/pwcli/) Python/3.7.3 Message-ID: <164337882901.4682.2390001655219643717.kvalo@kernel.org> Date: Fri, 28 Jan 2022 14:07:10 +0000 (UTC) Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Phil Elwell wrote: > The call to brcm_alt_fw_path in brcmf_fw_get_firmwares is not protected > by a check to the validity of the fwctx->req->board_type pointer. This > results in a crash in strlcat when, for example, the WLAN chip is found > in a USB dongle. > > Prevent the crash by adding the necessary check. > > See: https://github.com/raspberrypi/linux/issues/4833 > > Fixes: 5ff013914c62 ("brcmfmac: firmware: Allow per-board firmware binaries") > Signed-off-by: Phil Elwell Patch applied to wireless.git, thanks. 665408f4c3a5 brcmfmac: firmware: Fix crash in brcm_alt_fw_path -- https://patchwork.kernel.org/project/linux-wireless/patch/20220118154514.3245524-1-phil@raspberrypi.com/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches