]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 3007] Fix bug in crypto-NAK check
authorHarlan Stenn <stenn@ntp.org>
Thu, 21 Apr 2016 23:29:30 +0000 (23:29 +0000)
committerHarlan Stenn <stenn@ntp.org>
Thu, 21 Apr 2016 23:29:30 +0000 (23:29 +0000)
bk: 5719625aNcSIWNqKMs4tNUS8r4xp-Q

ChangeLog
ntpd/ntp_proto.c

index c45087e4d331ca49c38df4bcdebfaf30f4893530..6dfbb4e8060f9d3b87c5314d057bce0052b6eaba 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -21,7 +21,7 @@
 * [Bug 2994] Systems with HAVE_SIGNALED_IO fail to compile. perlinger@ntp.org
 * [Bug 2995] Fixes to compile on Windows
 * [Bug 2999] out-of-bounds access in 'is_safe_filename()'. perlinger@ntp.org
-* [Bug 3007] Validate crypto-NAKs
+* [Bug 3007] Validate crypto-NAKs.  Danny Mayer.
 * [Bug 3009] Crafted addpeer with hmode > 7 causes OOB error. perlinger@ntp.org
    - added more stringent checks on packet content
 * [Bug 3010] remote configuration trustedkey/requestkey values
index 7eaf738a23f8bdaf235ee1195b6db525d636a27e..f22ff54184cbc288ab2c645477b94dc7e1d66b81 100644 (file)
@@ -852,7 +852,9 @@ receive(
         */
        if (crypto_nak_test == INVALIDNAK) {
                report_event(PEVNT_AUTH, peer, "Invalid_NAK");
-               peer->badNAK++;
+               if (0 != peer) {
+                       peer->badNAK++;
+               }
                msyslog(LOG_ERR, "Invalid-NAK error at %ld %s<-%s", 
                        current_time, stoa(dstadr_sin), stoa(&rbufp->recv_srcadr));
                return;