From: Harlan Stenn Date: Sat, 6 May 2023 11:34:11 +0000 (-0500) Subject: Bug 3767: An OOB KoD RATE value triggers an assertion when debug is enabled. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c053b2fa90d88edc1039a87f246b0f603f26c3b;p=thirdparty%2Fntp.git Bug 3767: An OOB KoD RATE value triggers an assertion when debug is enabled. bk: 64563b33HAzuFQbf88wBrgLNRvnTcg --- diff --git a/ChangeLog b/ChangeLog index 3d2f817b5..cfd187332 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,13 @@ --- -* [Bug 3814] First poll delay of new or cleared associations miscalculated. - * [Sec 3808] Assertion failure in ntpq on malformed RT-11 date * [Sec 3807] praecis_parse() in the Palisade refclock driver has a hypothetical input buffer overflow. Reported by ... stenn@ * [Sec 3806] libntp/mstolfp.c needs bounds checking - solved numerically instead of using string manipulation +* [Sec 3767] An OOB KoD RATE value triggers an assertion when debug is enabled. + +* [Bug 3814] First poll delay of new or cleared associations miscalculated. + * [Bug 3802] ntp-keygen -I default identity modulus bits too small for OpenSSL 3. Reported by rmsh1216@163.com * [Bug 3801] gpsdjson refclock gps_open() device name mishandled. diff --git a/configure.ac b/configure.ac index 4bdda1da6..c2dce35e8 100644 --- a/configure.ac +++ b/configure.ac @@ -4208,6 +4208,24 @@ case "$ans" in esac +AC_MSG_CHECKING([if we want a debug assert on an OOB KoD RATE value]) +AC_ARG_ENABLE( + [bug3767-fix], + [AS_HELP_STRING( + [--enable-bug3767-fix], + [+ Disable debug assertion on OOB KoD RATE value] + )], + [ans=$enableval], + [ans=yes] +) +AC_MSG_RESULT([$ans]) +case "$ans" in + no) + AC_DEFINE([DISABLE_BUG3767_FIX], [1], + [Disable debug assertion on OOB KoD RATE value?]) +esac + + AC_MSG_CHECKING([if we should use the IRIG sawtooth filter]) case "$host" in diff --git a/ntpd/ntp_config.c b/ntpd/ntp_config.c index 96e0c5dda..008cfdbbc 100644 --- a/ntpd/ntp_config.c +++ b/ntpd/ntp_config.c @@ -3082,7 +3082,9 @@ get_pollskew( ) { +#ifdef DISABLE_BUG3767_FIX DEBUG_INSIST(3 <= p && 17 >= p); +#endif if (3 <= p && 17 >= p) { *rv = psl[p - 3];