Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/usr.sbin/rwhod Pull up revision 1.16 (requested by mjl):



details:   https://anonhg.NetBSD.org/src/rev/b89f3642649f
branches:  netbsd-1-4
changeset: 469716:b89f3642649f
user:      he <he%NetBSD.org@localhost>
date:      Sat Nov 20 17:22:20 1999 +0000

description:
Pull up revision 1.16 (requested by mjl):
  Fix possible Denial-of-Service attack triggered by sending short
  packets to rwhod.

diffstat:

 usr.sbin/rwhod/rwhod.c |  8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diffs (25 lines):

diff -r ee0fb3af3c85 -r b89f3642649f usr.sbin/rwhod/rwhod.c
--- a/usr.sbin/rwhod/rwhod.c    Sat Nov 20 17:17:27 1999 +0000
+++ b/usr.sbin/rwhod/rwhod.c    Sat Nov 20 17:22:20 1999 +0000
@@ -41,7 +41,7 @@
 #if 0
 static char sccsid[] = "@(#)rwhod.c    8.1 (Berkeley) 6/6/93";
 #else
-__RCSID("$NetBSD: rwhod.c,v 1.14 1998/07/08 15:17:57 mrg Exp $");
+__RCSID("$NetBSD: rwhod.c,v 1.14.2.1 1999/11/20 17:22:20 he Exp $");
 #endif
 #endif /* not lint */
 
@@ -189,6 +189,12 @@
                                ntohs(from.sin_port));
                        continue;
                }
+               if (cc < WHDRSIZE) {
+                       syslog(LOG_WARNING, "Short packet from %s",
+                               inet_ntoa(from.sin_addr));
+                       continue;
+               }
+
                if (wd.wd_vers != WHODVERSION)
                        continue;
                if (wd.wd_type != WHODTYPE_STATUS)



Home | Main Index | Thread Index | Old Index