Module Name: src Committed By: snj Date: Wed Dec 9 04:53:39 UTC 2009
Modified Files: src/dist/ntp/ntpd [netbsd-4]: ntp_request.c Log Message: Apply patch (requested by kardel in ticket 1369): Fix CVE-2009-3563. To generate a diff of this commit: cvs rdiff -u -r1.5.4.1 -r1.5.4.2 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.5.4.1 src/dist/ntp/ntpd/ntp_request.c:1.5.4.2 --- src/dist/ntp/ntpd/ntp_request.c:1.5.4.1 Tue Aug 21 08:40:03 2007 +++ src/dist/ntp/ntpd/ntp_request.c Wed Dec 9 04:53:39 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ntp_request.c,v 1.5.4.1 2007/08/21 08:40:03 ghen Exp $ */ +/* $NetBSD: ntp_request.c,v 1.5.4.2 2009/12/09 04:53:39 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; }