2001-04-13 Harlan Stenn <stenn@whimsy.udel.edu>
+ * ntpd/ntp_control.c (ctl_getitem): msyslog() possible buffer
+ overflow exploit.
+
* configure.in: 4.0.99k24
* html/pic/radio2.jpg:
up some loop logic.
* ntpd/ntp_config.c: Added "tinker" and "minpoll". Use
sys_minpoll now, instead of old manifest constant.
- (save_resolve): Print keyid using decimal, not hex.
+ (save_resolve): Print keyid using decimal, not hex. From Lars-Owe
+ Ivarsson <larsowe@paradisaea.its.uu.se>
* include/ntpd.h: Added peer_ntpdate and sys_minpoll.
* include/ntp_config.h (CONF_CLOCK_MINPOLL): Added.
* include/ntp.h: keyid cleanup. LOOP_* cleanup.
#include <ctype.h>
#include <signal.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+
+
#ifdef PUBKEY
#include "ntp_crypto.h"
#endif /* PUBKEY */
cp++;
while (cp < reqend && *cp != ',') {
*tp++ = *cp++;
- if (tp >= buf + sizeof(buf))
+ if (tp >= buf + sizeof(buf)) {
+ msyslog(LOG_WARNING,
+ "Possible 'ntpdx' exploit from %s:%d (possibly spoofed)\n",
+ inet_ntoa(rmt_addr->sin_addr), ntohs(rmt_addr->sin_port)
+ );
return (0);
+ }
}
if (cp < reqend)
cp++;