From: Arend van Spriel <arend.vanspriel@broadcom.com>
To: Zhou Qingyang <zhou1615@umn.edu>
Cc: kjlu@umn.edu, Arend van Spriel <aspriel@gmail.com>,
Franky Lin <franky.lin@broadcom.com>,
Hante Meuleman <hante.meuleman@broadcom.com>,
Chi-hsien Lin <chi-hsien.lin@infineon.com>,
Wright Feng <wright.feng@infineon.com>,
Chung-hsien Hsu <chung-hsien.hsu@infineon.com>,
Kalle Valo <kvalo@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Len Baker <len.baker@gmx.com>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
Shawn Guo <shawn.guo@linaro.org>,
Hans deGoede <hdegoede@redhat.com>,
Matthias Brugger <mbrugger@suse.com>,
linux-wireless@vger.kernel.org,
brcm80211-dev-list.pdl@broadcom.com,
SHA-cyfmac-dev-list@infineon.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] brcmfmac: Fix a NULL pointer dereference in brcmf_of_probe()
Date: Wed, 26 Jan 2022 14:44:15 +0100 [thread overview]
Message-ID: <84c2e35f-ec6a-93ee-0bca-f8ed535bc3f2@broadcom.com> (raw)
In-Reply-To: <20220124165048.54677-1-zhou1615@umn.edu>
[-- Attachment #1: Type: text/plain, Size: 761 bytes --]
On 1/24/2022 5:50 PM, 'Zhou Qingyang' via BRCM80211-DEV-LIST,PDL wrote:
> In brcmf_of_probe(), the return value of devm_kzalloc() is assigned to
> board_type and there is a dereference of it in strcpy() right after
> that. devm_kzalloc() could return NULL on failure of allocation, which
> could lead to NULL pointer dereference.
>
> Fix this bug by adding a NULL check of board_type.
>
> This bug was found by a static analyzer.
>
> Builds with 'make allyesconfig' show no new warnings,
> and our static analyzer no longer warns about this code
Thanks for this suggestion. However, this has been addressed already by
this patch [1].
Regards,
Arend
[1]
https://patchwork.kernel.org/project/linux-wireless/patch/20220117142919.207370-8-marcan@marcan.st/
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4219 bytes --]
next prev parent reply other threads:[~2022-01-26 13:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-24 16:50 [PATCH] brcmfmac: Fix a NULL pointer dereference in brcmf_of_probe() Zhou Qingyang
2022-01-26 13:44 ` Arend van Spriel [this message]
2022-01-28 10:19 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=84c2e35f-ec6a-93ee-0bca-f8ed535bc3f2@broadcom.com \
--to=arend.vanspriel@broadcom.com \
--cc=SHA-cyfmac-dev-list@infineon.com \
--cc=aspriel@gmail.com \
--cc=brcm80211-dev-list.pdl@broadcom.com \
--cc=chi-hsien.lin@infineon.com \
--cc=chung-hsien.hsu@infineon.com \
--cc=davem@davemloft.net \
--cc=franky.lin@broadcom.com \
--cc=gustavoars@kernel.org \
--cc=hante.meuleman@broadcom.com \
--cc=hdegoede@redhat.com \
--cc=kjlu@umn.edu \
--cc=kuba@kernel.org \
--cc=kvalo@kernel.org \
--cc=len.baker@gmx.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mbrugger@suse.com \
--cc=netdev@vger.kernel.org \
--cc=shawn.guo@linaro.org \
--cc=wright.feng@infineon.com \
--cc=zhou1615@umn.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).