Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > e8c0b673ea1b7e162bcac8e349d03cea > files > 19

ntp-4.2.2p1-15.el5_7.1.src.rpm

# This is a BitKeeper generated diff -Nru style patch.
#
# ntpd/ntp_request.c
#   2009/10/07 01:33:21+00:00 davehart@shiny.ad.hartbrothers.com +9 -2
#   [Sec 1331] DoS with mode 7 packets - CVE-2009-3563.
#
diff -Nrpu a/ntpd/ntp_request.c b/ntpd/ntp_request.c
--- a/ntpd/ntp_request.c	2009-10-14 19:52:16 +00:00
+++ b/ntpd/ntp_request.c	2009-10-14 19:52:16 +00:00
@@ -409,6 +409,7 @@ process_private(
 	int mod_okay
 	)
 {
+	static u_long quiet_until;
 	struct req_pkt *inpkt;
 	struct req_pkt_tail *tailinpkt;
 	struct sockaddr_storage *srcadr;
@@ -444,8 +445,14 @@ process_private(
 	    || (++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;
 	}