Module Name: src
Committed By: snj
Date: Wed Dec 9 04:45:48 UTC 2009
Modified Files:
src/dist/ntp/ntpd [netbsd-5-0]: ntp_request.c
Log Message:
Apply patch (requested by kardel in ticket 1185):
Fix CVE-2009-3563.
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.8.8.1 src/dist/ntp/ntpd/ntp_request.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/dist/ntp/ntpd/ntp_request.c
diff -u src/dist/ntp/ntpd/ntp_request.c:1.8 src/dist/ntp/ntpd/ntp_request.c:1.8.8.1
--- src/dist/ntp/ntpd/ntp_request.c:1.8 Sat Aug 23 09:10:31 2008
+++ src/dist/ntp/ntpd/ntp_request.c Wed Dec 9 04:45:48 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: ntp_request.c,v 1.8 2008/08/23 09:10:31 kardel Exp $ */
+/* $NetBSD: ntp_request.c,v 1.8.8.1 2009/12/09 04:45:48 snj Exp $ */
/*
* ntp_request.c - respond to information requests
@@ -411,6 +411,7 @@
int mod_okay
)
{
+ static u_long quiet_until;
struct req_pkt *inpkt;
struct req_pkt_tail *tailinpkt;
struct sockaddr_storage *srcadr;
@@ -446,8 +447,14 @@
|| (++ec, INFO_MBZ(inpkt->mbz_itemsize) != 0)
|| (++ec, rbufp->recv_length < REQ_LEN_HDR)
) {
- msyslog(LOG_ERR, "process_private: INFO_ERR_FMT: test %d failed, pkt from %s", ec, stoa(srcadr));
- req_ack(srcadr, inter, inpkt, INFO_ERR_FMT);
+ NLOG(NLOG_SYSEVENT)
+ if (current_time >= quiet_until) {
+ msyslog(LOG_ERR,
+ "process_private: drop test %d"
+ " failed, pkt from %s",
+ ec, stoa(srcadr));
+ quiet_until = current_time + 60;
+ }
return;
}