Skip to content
Commit c4caf72a authored by Phil Elwell's avatar Phil Elwell Committed by Greg Kroah-Hartman
Browse files

brcmfmac: firmware: Fix crash in brcm_alt_fw_path

commit 665408f4 upstream.

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: 5ff01391

 ("brcmfmac: firmware: Allow per-board firmware binaries")
Signed-off-by: default avatarPhil Elwell <phil@raspberrypi.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220118154514.3245524-1-phil@raspberrypi.com
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 00fb850c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment