From 74e19d451cfa4397b58745a1efcfce81d2eb6426 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Tempel?= Date: Mon, 7 Oct 2019 15:05:38 +0200 Subject: [PATCH] emcute: never return from receive loop Without this change an attacker would be able to stop the emcute server by sending a crafted packet triggering this branch. The solution is using `continue` instead of `return`. --- sys/net/application_layer/emcute/emcute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/application_layer/emcute/emcute.c b/sys/net/application_layer/emcute/emcute.c index 81ae2a7fe0..b2ec223294 100644 --- a/sys/net/application_layer/emcute/emcute.c +++ b/sys/net/application_layer/emcute/emcute.c @@ -515,7 +515,7 @@ void emcute_run(uint16_t port, const char *id) if ((len < 0) && (len != -ETIMEDOUT)) { LOG_ERROR("[emcute] error while receiving UDP packet\n"); - return; + continue; } if (len >= 2) {