forward_udp_to_owner: sanity check of session_id_size

Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
This commit is contained in:
Nikos Mavrogiannopoulos
2022-02-15 10:18:46 +01:00
parent cdcc5eda4d
commit 53b08d2433

View File

@@ -712,6 +712,12 @@ int sfd = -1;
human_addr((struct sockaddr*)&cli_addr, cli_addr_size, tbuf, sizeof(tbuf)));
goto fail;
}
if (session_id_size <= 0 || session_id_size > GNUTLS_MAX_SESSION_ID) {
mslog(s, NULL, LOG_INFO, "%s: invalid session ID size",
human_addr((struct sockaddr*)&cli_addr, cli_addr_size, tbuf, sizeof(tbuf)));
goto fail;
}
}
/* search for the IP and the session ID in all procs */