diff --git a/src/server.c b/src/server.c index 142cb980..cea6ad5c 100644 --- a/src/server.c +++ b/src/server.c @@ -591,6 +591,12 @@ server_recv_cb(EV_P_ ev_io *w, int revents) close_and_free_server(EV_A_ server); return; } else if (err == CRYPTO_NEED_MORE) { + if (server->stage != STAGE_STREAM && server->frag > 1) { + report_addr(server->fd, MALICIOUS, "malicious fragmentation"); + close_and_free_remote(EV_A_ remote); + close_and_free_server(EV_A_ server); + } + server->frag++; return; }