]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DPP2: Fix Presence Announcement processing in Controller
authorJouni Malinen <jouni@codeaurora.org>
Mon, 11 May 2020 12:59:12 +0000 (15:59 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 11 May 2020 14:26:11 +0000 (17:26 +0300)
Use the new struct dpp_authentication instance when setting Configurator
parameters for authentication exchange triggered by Presence
Announcement. conn->auth is NULL here and would cause dereferencing of a
NULL pointer if dpp_configurator_params is set.

Fixes: fa5143feb3cb ("DPP2: Presence Announcement processing in Controller")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/common/dpp_tcp.c

index 3165a03f993907188c3327b1ed4d2d0b73e8e721..5a824943d4a027e3239830f21de7058a59765e02 100644 (file)
@@ -804,8 +804,7 @@ static int dpp_controller_rx_presence_announcement(struct dpp_connection *conn,
                             DPP_CAPAB_CONFIGURATOR, -1, NULL, 0);
        if (!auth)
                return -1;
-       if (dpp_set_configurator(conn->auth,
-                                conn->ctrl->configurator_params) < 0) {
+       if (dpp_set_configurator(auth, conn->ctrl->configurator_params) < 0) {
                dpp_auth_deinit(auth);
                dpp_connection_remove(conn);
                return -1;