mac80211: brcmfmac: fix use-after-free & possible NULL pointer dereference
authorRafał Miłecki <rafal@milecki.pl>
Mon, 7 Jan 2019 16:11:23 +0000 (17:11 +0100)
committerRafał Miłecki <rafal@milecki.pl>
Mon, 7 Jan 2019 16:13:59 +0000 (17:13 +0100)
commit529c95cc15dc9fcc7709400cc921f2a3c03cd263
tree1d095a964796c83a4e406c04ac225763ad45e31e
parent630d8b87a570b87ec3a0a2f950e87f674d381800
mac80211: brcmfmac: fix use-after-free & possible NULL pointer dereference

1) Using fwctx variable after brcmf_fw_request_done() was executed meant
   accessing freed memory.
2) Using fwctx->completion for the wait_for_completion_timeout() call
   could reuslt in NULL pointer dereference on fw loading error or if
   brcmf_fw_request_done() was executed quickly enough.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
package/kernel/mac80211/patches/brcm/860-brcmfmac-register-wiphy-s-during-module_init.patch