[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <171025755133.1969294.16879379450612075833.kvalo@kernel.org>
Date: Tue, 12 Mar 2024 15:32:33 +0000 (UTC)
From: Kalle Valo <kvalo@...nel.org>
To: Duoming Zhou <duoming@....edu.cn>
Cc: linux-kernel@...r.kernel.org, brcm80211-dev-list.pdl@...adcom.com,
brcm80211@...ts.linux.dev, linux-wireless@...r.kernel.org,
minipli@...ecurity.net, hdegoede@...hat.com, arend.vanspriel@...adcom.com,
arnd@...db.de, Duoming Zhou <duoming@....edu.cn>
Subject: Re: [PATCH v2] wifi: brcmfmac: pcie: handle randbuf allocation
failure
Duoming Zhou <duoming@....edu.cn> wrote:
> The kzalloc() in brcmf_pcie_download_fw_nvram() will return null
> if the physical memory has run out. As a result, if we use
> get_random_bytes() to generate random bytes in the randbuf, the
> null pointer dereference bug will happen.
>
> In order to prevent allocation failure, this patch adds a separate
> function using buffer on kernel stack to generate random bytes in
> the randbuf, which could prevent the kernel stack from overflow.
>
> Fixes: 91918ce88d9f ("wifi: brcmfmac: pcie: Provide a buffer of random bytes to the device")
> Suggested-by: Arnd Bergmann <arnd@...db.de>
> Signed-off-by: Duoming Zhou <duoming@....edu.cn>
Patch applied to wireless-next.git, thanks.
316f790ebcf9 wifi: brcmfmac: pcie: handle randbuf allocation failure
--
https://patchwork.kernel.org/project/linux-wireless/patch/20240306140437.18177-1-duoming@zju.edu.cn/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Powered by blists - more mailing lists