From: Harlan Stenn Date: Wed, 29 Jul 2009 06:03:51 +0000 (-0400) Subject: [Bug 1276 normal] CID 52: crypto_xmit() may call crypto_alice[23]() with NULL peer X-Git-Tag: NTP_4_2_5P196~2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4df4d928ef620d7aca8d58d1c543ba3e0357625;p=thirdparty%2Fntp.git [Bug 1276 normal] CID 52: crypto_xmit() may call crypto_alice[23]() with NULL peer bk: 4a6fe647ZPKQZlZnLHSu1yxGYw_-MQ --- diff --git a/ChangeLog b/ChangeLog index 58a73dbea..86ded2f27 100644 --- 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 * cvo.sh: Add support for CentOS, Fedora, Slackware, SuSE. (4.2.5p194) 2009/07/26 Released by Harlan Stenn diff --git a/ntpd/ntp_crypto.c b/ntpd/ntp_crypto.c index b58297d83..73d32abc4 100644 --- a/ntpd/ntp_crypto.c +++ b/ntpd/ntp_crypto.c @@ -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);