Processing of WNM frames can results in a lookup of the current BSS
table. As such, the testing tool needs to initialize the BSS table to
avoid NULL pointer dereferences. This is not an issue that would show up
with real production uses with wpa_supplicant since wpa_bss_init() is
called there.
Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=67244
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
ctx->wpa_s.driver = &ctx->driver;
ctx->wpa_s.wpa = &ctx->wpa;
ctx->wpa_s.conf = &ctx->conf;
+ if (wpa_bss_init(&ctx->wpa_s) < 0)
+ return -1;
return 0;
}
static void deinit_wpa(struct arg_ctx *ctx)
{
wnm_btm_reset(&ctx->wpa_s);
+ wpa_bss_flush(&ctx->wpa_s);
}