summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--plugins/imudp/imudp.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index abec5762..331afe80 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,11 @@
Version 4.4.2 [v4-stable] (rgerhards), 2009-09-??
- bugfix: invalid handling of zero-sized messages, could lead to mis-
addressing and potential memory corruption/segfault
+- bugfix: zero-sized UDP messages are no longer processed
+ until now, they were forwarded to processing, but this makes no sense
+ Also, it looks like the system seems to provide a zero return code
+ on a UDP recvfrom() from time to time for some internal reasons. These
+ "receives" are now silently ignored.
- bugfix: random data could be appended to message, possibly causing
segfaults
- bugfix: reverse lookup reduction logic in imudp do DNS queries too often
diff --git a/plugins/imudp/imudp.c b/plugins/imudp/imudp.c
index 658ceb23..6f4a6384 100644
--- a/plugins/imudp/imudp.c
+++ b/plugins/imudp/imudp.c
@@ -178,6 +178,9 @@ processSocket(int fd, struct sockaddr_storage *frominetPrev, int *pbIsPermitted,
ABORT_FINALIZE(RS_RET_ERR);
}
+ if(lenRcvBuf == 0)
+ continue; /* this looks a bit strange, but practice shows it happens... */
+
/* if we reach this point, we had a good receive and can process the packet received */
/* check if we have a different sender than before, if so, we need to query some new values */
if(net.CmpHost(&frominet, frominetPrev, socklen) != 0) {