Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2729632pxb; Mon, 31 Jan 2022 03:05:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJz+AM9oWJWYpn39jrVbdqpQRHbJcSefdIzhXWxyNFWcd7cu48XbiJCjjkRCMPCbj33UDDYk X-Received: by 2002:a65:4985:: with SMTP id r5mr16423088pgs.299.1643627120338; Mon, 31 Jan 2022 03:05:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643627120; cv=none; d=google.com; s=arc-20160816; b=SJJMBtzvyCNmRSRJF5cehcSpFDizgsHU7Ej46oocYPm2MfqgTWdWt6gPBaVOpF5jBo MNRyylWS4SGXK8oJAWOxXn0QBC7PRiF5KZVkXa6ZR8d7aV2d3Gl+k3byRtd60XIj0f2C feNZz5Be2C3GDwhNZXZ+IYMlDlYsC97SZEFPfT7lZI2pHCDKyljnhcy2v9JsKPxn3QE0 1/gYcLFgNiUvkKh1usd+27cUmk3St+ZPTFwyvXLr6we4skgevVAWYb//9hW0WBNzET9g TX0AibgmfFVrAW0YzTrEmNvbQwctp7VHbtK4WGk/Eqz9BNRcwESC3D+u7qCLGULyI2na 468w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:message-id:user-agent:cc:to:references :in-reply-to:from:subject:content-transfer-encoding:mime-version :dkim-signature; bh=1kGQzXvH5bUc4I262XAlRz8DLa0+RmEwnkq0ifQenpg=; b=e+zXu4UnAccpGMC2Xll7fTJprPGu4Bv2ylRTNxdSPfboyr45h7Ek4joDk2U+ZuXOI3 46y7+NRBVTC/ptKx8SahCcoKTjdjEm+mRlnmKyD/L/QzPReZiomnQshDY5tG3JWgC+hO I6jKyAaQVuSJ78U5nwnVbZpEmQmdRj7rC0NPGT4WXoYjBWwBQ0cu83U1vS1S4Pl6iclj lSUmqNXzyqy2tCPJxLFgSc+zoIZOZSeoaiFTuIhrnojr9VWhmQaGZf9YlSZVl8TfjLPy qpTCungqd9XQd1cUJHaXJ+OtvljqHyRxeNSXKLT+8USnkc2MBxSD5XHp+Q49mQ0Tb7wm clhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fF6G5Sg1; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d9si12619444pgg.553.2022.01.31.03.05.11; Mon, 31 Jan 2022 03:05:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-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=k20201202 header.b=fF6G5Sg1; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244057AbiA1OHT (ORCPT + 72 others); 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