Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1054720pxb; Fri, 21 Jan 2022 08:57:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJxO+vABCPwEbZiDSE+H2T9wFVp8GZOZ0P29q8uhV3sop/TmODGguKulIJq7jkHy8wCoupsw X-Received: by 2002:a17:90b:3e84:: with SMTP id rj4mr1583158pjb.195.1642784252092; Fri, 21 Jan 2022 08:57:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642784252; cv=none; d=google.com; s=arc-20160816; b=HHFszR0zRJL6aXb+OuI4lJthHDjuaNYiB2AyiqOInaySnHA4OvU+UdZOu+8BaWL60z 1UJFhidWpno7jvG1wtuCAZ7H4f6ZuqmffBLh5c1mMPKbmOIkUYorR3YPkrRTWq8iSTS/ SM7kQunAHW24O+qnJQKalWgB7brqEkJLf4TF+3XIfQJa3QcfagpR8/+U6Xce/YdwWWGf ODZHVxIe/+MEj7YyYTWbcmyoWHAKhjYgajEIxX0pZ5r7h92pSenLmPvLGMwKmpkkACJJ 5yButR+oVay+FIPPltcH1jyWOp73Ihg44TSzJOUxPiO/p9589OGo7NiiozMNYuK0sx9H eHhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from:dkim-signature; bh=DW27lVDQBl31JP7puVmVh4XQyOsgGRVY2y/6hx4Wr1Q=; b=Q6HON4cWZEjwJsal7bQPWI/ynvMZjvy6oconMTvIBB/qrt8AAF4wrINm+w8FCmTt9R SU5IQipkr0iSLkEB6JTjZowYyegJIEQUklWpggb4Z/LFfw8TNI7o20+64muYEyPLpX36 UDCCQukXAuK7iTBdN3LdE5OTUEuzwVsjQ7uS6daGvJQ5+IGHdkPgWAkSpbJDkPp0BYfn KBbvG0yuVctAAjVWlLyiNxoOllMLYCShYQTWBlXxN53C3W6g9/EAvY/VwLSGVhX5L+FN cUMG2YKPa99lLz3YtPON9NYiEPrZSl1hIrYD9sJO1xr0eWKRBQ7RUb1LPQx1ZJCRBYkD Kqbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nIBCsEG+; 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 q11si6002978pjg.95.2022.01.21.08.57.16; Fri, 21 Jan 2022 08:57:32 -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=nIBCsEG+; 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 S1351670AbiASGBW (ORCPT + 70 others); Wed, 19 Jan 2022 01:01:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349940AbiASGBO (ORCPT ); Wed, 19 Jan 2022 01:01:14 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C44B9C061574 for ; Tue, 18 Jan 2022 22:01:14 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 62BB760ADB for ; Wed, 19 Jan 2022 06:01:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BFF78C004E1; Wed, 19 Jan 2022 06:01:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1642572073; bh=mtSq2jQ0wam87rCLJDrAT/LDjsioSOG/4ILc+0JuQ3I=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=nIBCsEG+8Vz2SJ8rc/TSv7jyNED69cM999lc/zl+v42hV98NAxj8JR1iHobsb9/jI cKjzZS3LVMZFqwT9V8x50Zn0r88Gn3T3Ke4urA5sfza8GXayc/SyUcwLQc3grlaGaT jIZnyM70tNPko0Np7rzv0Z4ZpD1IkWB+zXxCuvqDTZzwDtsUoqytW/w3aM5EMTClMf U0UmWiPAF3A5+bP861ZdAleLPKWxVoVeW47SkH5xhtowAKoVBPloiY/oL0kKlE0fs1 mbsC2cxrijpnJ6hN7Z5axgoHyBKCnX2Og5E/5wctjV/mdwQgFZF15/UCvjDwCHZ1d4 ssRjq/C+Syb4g== From: Kalle Valo To: Phil Elwell Cc: Arend van Spriel , Chung-hsien Hsu , "David S. Miller" , Jakub Kicinski , Linus Walleij , linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, SHA-cyfmac-dev-list@infineon.com Subject: Re: [PATCH] brcmfmac: firmware: Fix crash in brcm_alt_fw_path In-Reply-To: <20220118154514.3245524-1-phil@raspberrypi.com> (Phil Elwell's message of "Tue, 18 Jan 2022 15:45:14 +0000") References: <20220118154514.3245524-1-phil@raspberrypi.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Date: Wed, 19 Jan 2022 08:01:08 +0200 Message-ID: <87h7a0gt7f.fsf@kernel.org> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Phil Elwell writes: > 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 I think this should go to v5.17. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches