lkml.org 
[lkml]   [2022]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] brcmfmac: Fix a NULL pointer dereference in brcmf_of_probe()
From
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/
[unhandled content-type:application/pkcs7-signature]
\
 
 \ /
  Last update: 2022-01-26 14:45    [W:0.047 / U:0.728 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site