]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 1276 normal] CID 52: crypto_xmit() may call crypto_alice[23]() with NULL peer
authorHarlan Stenn <stenn@ntp.org>
Wed, 29 Jul 2009 06:03:51 +0000 (02:03 -0400)
committerHarlan Stenn <stenn@ntp.org>
Wed, 29 Jul 2009 06:03:51 +0000 (02:03 -0400)
bk: 4a6fe647ZPKQZlZnLHSu1yxGYw_-MQ

ChangeLog
ntpd/ntp_crypto.c

index 58a73dbeadd129736d39a234e63971157de8b557..86ded2f27311382ea81660deecb9e6688350f369 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,5 @@
+* [Bug 1276 normal] CID 52: crypto_xmit() may call crypto_alice[23]()
+  with NULL peer
 (4.2.5p195) 2009/07/27 Released by Harlan Stenn <stenn@ntp.org>
 * cvo.sh: Add support for CentOS, Fedora, Slackware, SuSE.
 (4.2.5p194) 2009/07/26 Released by Harlan Stenn <stenn@ntp.org>
index b58297d834dc9e5f7c2ba96c142333c0c853ae9a..73d32abc457286a4ac20c3a59a633e54c645171c 100644 (file)
@@ -1212,6 +1212,9 @@ crypto_xmit(
         * Send challenge in Schnorr (IFF) identity scheme.
         */
        case CRYPTO_IFF:
+               if (peer == NULL)
+                       break;          /* hack attack */
+
                if ((rval = crypto_alice(peer, &vtemp)) == XEVNT_OK) {
                        len = crypto_send(fp, &vtemp, start);
                        value_free(&vtemp);
@@ -1232,6 +1235,9 @@ crypto_xmit(
         * Send challenge in Guillou-Quisquater (GQ) identity scheme.
         */
        case CRYPTO_GQ:
+               if (peer == NULL)
+                       break;          /* hack attack */
+
                if ((rval = crypto_alice2(peer, &vtemp)) == XEVNT_OK) {
                        len = crypto_send(fp, &vtemp, start);
                        value_free(&vtemp);
@@ -1252,6 +1258,9 @@ crypto_xmit(
         * Send challenge in MV identity scheme.
         */
        case CRYPTO_MV:
+               if (peer == NULL)
+                       break;          /* hack attack */
+
                if ((rval = crypto_alice3(peer, &vtemp)) == XEVNT_OK) {
                        len = crypto_send(fp, &vtemp, start);
                        value_free(&vtemp);