summaryrefslogtreecommitdiff
path: root/net/ntp/files
diff options
context:
space:
mode:
authorFUJISHIMA Satsuki <sf@FreeBSD.org>2001-04-05 19:59:25 +0000
committerFUJISHIMA Satsuki <sf@FreeBSD.org>2001-04-05 19:59:25 +0000
commit47c044032938bb347debae6879ef13652f4c9439 (patch)
treef4058447ef78c06a1e61eaba5060066fce4b1f86 /net/ntp/files
parentAdd acorn 0.3, a meta-port for the Worldforge Client uclient. (diff)
o Fix a potential ROOT-exploit in NTPD.
(grabbed from src/contrib/ntp/ntpd) o new maintainer. PR: 26369 Submitted by: Cy Schubert <Cy.Schubert@uumail.gov.bc.ca>
Notes
Notes: svn path=/head/; revision=40915
Diffstat (limited to 'net/ntp/files')
-rw-r--r--net/ntp/files/patch-ntp_control.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/net/ntp/files/patch-ntp_control.c b/net/ntp/files/patch-ntp_control.c
new file mode 100644
index 000000000000..a0faa4906d04
--- /dev/null
+++ b/net/ntp/files/patch-ntp_control.c
@@ -0,0 +1,24 @@
+--- ntpd/ntp_control.c.orig Sat Jul 15 23:46:05 2000
++++ ntpd/ntp_control.c Fri Apr 6 01:05:57 2001
+@@ -1821,9 +1821,19 @@
+ while (cp < reqend &&
+ isspace((int)*cp))
+ cp++;
+- while (cp < reqend && *cp !=
+- ',')
++ while (cp < reqend && *cp != ',') {
+ *tp++ = *cp++;
++ if (tp > buf + sizeof(buf)) {
++ msyslog(LOG_WARNING, "Attempted \"ntpdx\" exploit from IP %d.%d.%d.%d:%d (possibly spoofed)\n",
++ (ntohl(rmt_addr->sin_addr.s_addr) >> 24) & 0xff,
++ (ntohl(rmt_addr->sin_addr.s_addr) >> 16) & 0xff,
++ (ntohl(rmt_addr->sin_addr.s_addr) >> 8) & 0xff,
++ (ntohl(rmt_addr->sin_addr.s_addr) >> 0) & 0xff,
++ ntohs(rmt_addr->sin_port)
++);
++ return (0);
++ }
++ }
+ if (cp < reqend)
+ cp++;
+ *tp = '\0';