wifi: brcmfmac: pcie: handle randbuf allocation failure
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
ba72baed066f3bfa8b489e4b58f1fcaf51c04f83| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
wifi: brcmfmac: pcie: handle randbuf allocation failure
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.
From the CVE record · Linux
In the Linux kernel's brcmfmac PCIe code, a memory allocation failure can cause a null pointer dereference while generating random bytes. The input does not specify how an attacker could trigger the failure or whether network access, authentication, or user interaction is required.
Engineers running Linux kernels with brcmfmac PCIe support should check their installations; affected versions are not specified.