]> git.ipfire.org Git - thirdparty/hostap.git/commit
Ignore channel switch event if AP interface is not yet ready
authorJouni Malinen <jouni@codeaurora.org>
Fri, 26 Apr 2019 13:24:31 +0000 (16:24 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 26 Apr 2019 13:24:31 +0000 (16:24 +0300)
commitc3805fb62318741debf55ecb1a6ce9e4e60ae38d
tree2820f351df0c081506f81d48d02b2243e712cb83
parenteb314e8af2fa08f35e7787e2b6679df6138b3650
Ignore channel switch event if AP interface is not yet ready

It is apparently possible to somehow trigger the driver to report a
channel switch event during ACS operation when the interface information
is not yet complete. hapd->iface->current_mode could be NULL in that
case and that would result in process termination due to NULL pointer
dereference.

It should not really be possible to trigger a channel switch during ACS
is running (i.e., before the AP mode operation has been started), but
since that has been seen in an arbitrary test sequence with interface
start/stop operations with various parameters (both valid and invalid),
better prevent a crash here by ignoring the unexpected event instead of
trying to process it.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/ap/drv_callbacks.c