]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[bug 3432] backport (bk://bk.ntp.org/ntp-stable into ntp-stable-3432-p15)
authorJuergen Perlinger <perlinger@ntp.org>
Sun, 25 Oct 2020 05:14:24 +0000 (06:14 +0100)
committerJuergen Perlinger <perlinger@ntp.org>
Sun, 25 Oct 2020 05:14:24 +0000 (06:14 +0100)
bk: 5f9509b0AU-qIUbBWx9nbgaT63JTVA

1  2 
ChangeLog
include/ntp_refclock.h
include/ntp_stdlib.h
ntpd/ntp_refclock.c
ntpd/refclock_gpsdjson.c
ntpd/refclock_nmea.c
ntpd/refclock_oncore.c
ntpd/refclock_palisade.c
parseutil/dcfd.c
tests/libntp/run-caljulian.c

diff --cc ChangeLog
index eeceaa9f10cb57b56caf561eaab50a81ec861f63,5393c48f3e048c5acf430cef009a368c44f9210a..6576a26262237f90bcc1df3ccfed2314f84693c3
+++ b/ChangeLog
+ ---
+ * [Bug 3432] refclocks that 'write()' should check the result <perlinger@ntp.org>
+   - plus some more work on warnings for unchecked results
++
 +---
 +(4.2.8p15) 2020/06/23 Released by Harlan Stenn <stenn@ntp.org>
 +
 +* [Sec 3661] memory leak with AES128CMAC keys <perlinger@ntp.org>
 +* [Bug 3670] Regression from bad merge of 3592 and 3596 <perlinger@ntp.org>
 +  - fixed a bad merge that happened before 4.2.8-p14. Thanks to
 +    Sylar Tao for noticing this!
 +* [Bug 3667] decodenetnum fails with numeric port <perlinger@ntp.org>
 +  - rewrite 'decodenetnum()' in terms of inet_pton
 +* [Bug 3666] avoid unlimited receive buffer allocation <perlinger@ntp.org>
 +  - limit number of receive buffers, with an iron reserve for refclocks
 +* [Bug 3664] Enable openSSL CMAC support on Windows <burnicki@ntp.org>
 +* [Bug 3662] Fix build errors on Windows with VS2008 <burnicki@ntp.org>
 +* [Bug 3660] Manycast orphan mode startup discovery problem. <stenn@ntp.org>
 +  - integrated patch from Charles Claggett
 +* [Bug 3659] Move definition of psl[] from ntp_config.h to
 +  ntp_config.h <perlinger@ntp.org>
 +* [Bug 3657] Wrong "Autokey group mismatch" debug message <perlinger@ntp.org>
 +* [Bug 3655] ntpdc memstats hash counts <perlinger@ntp.org>
 +  - fix by Gerry garvey
 +* [Bug 3653] Refclock jitter RMS calculation <perlinger@ntp.org>
 +  - thanks to Gerry Garvey
 +* [Bug 3646] Avoid sync with unsync orphan <perlinger@ntp.org>
 +  - patch by Gerry Garvey
 +* [Bug 3644] Unsynchronized server [...] selected as candidate <perlinger@ntp.org>
 +* [Bug 3639] refclock_jjy: TS-JJY0x can skip time sync depending on the STUS reply. <abe@ntp.org>
 +  - applied patch by Takao Abe
 +
 +---
 +(4.2.8p14) 2020/03/03 Released by Harlan Stenn <stenn@ntp.org>
 +
 +* [Sec 3610] process_control() should bail earlier on short packets. stenn@
 +  - Reported by Philippe Antoine
 +* [Sec 3596] Highly predictable timestamp attack. <stenn@ntp.org>
 +  - Reported by Miroslav Lichvar
 +* [Sec 3592] DoS attack on client ntpd <perlinger@ntp.org>
 +  - Reported by Miroslav Lichvar
 +* [Bug 3637] Emit the version of ntpd in saveconfig.  stenn@
 +* [Bug 3636] NMEA: combine time/date from multiple sentences <perlinger@ntp.org>
 +* [Bug 3635] Make leapsecond file hash check optional <perlinger@ntp.org>
 +* [Bug 3634] Typo in discipline.html, reported by Jason Harrison.  stenn@
 +* [Bug 3628] raw DCF decoding - improve robustness with Zeller's congruence
 +  - implement Zeller's congruence in libparse and libntp <perlinger@ntp.org>
 +* [Bug 3627] SIGSEGV on FreeBSD-12 with stack limit and stack gap <perlinger@ntp.org>
 +  - integrated patch by Cy Schubert
 +* [Bug 3620] memory leak in ntpq sysinfo <perlinger@ntp.org>
 +  - applied patch by Gerry Garvey
 +* [Bug 3619] Honour drefid setting in cooked mode and sysinfo <perlinger@ntp.org>
 +  - applied patch by Gerry Garvey
 +* [Bug 3617] Add support for ACE III and Copernicus II receivers <perlinger@ntp.org>
 +  - integrated patch by Richard Steedman
 +* [Bug 3615] accelerate refclock startup <perlinger@ntp.org>
 +* [Bug 3613] Propagate noselect to mobilized pool servers <stenn@ntp.org>
 +  - Reported by Martin Burnicki
 +* [Bug 3612] Use-of-uninitialized-value in receive function <perlinger@ntp.org>
 +  - Reported by Philippe Antoine
 +* [Bug 3611] NMEA time interpreted incorrectly <perlinger@ntp.org>
 +  - officially document new "trust date" mode bit for NMEA driver
 +  - restore the (previously undocumented) "trust date" feature lost with [bug 3577] 
 +* [Bug 3609] Fixing wrong falseticker in case of non-statistic jitter <perlinger@ntp.org>
 +  - mostly based on a patch by Michael Haardt, implementing 'fudge minjitter'
 +* [Bug 3608] libparse fails to compile on S11.4SRU13 and later <perlinger@ntp.org>
 +  - removed ffs() and fls() prototypes as per Brian Utterback
 +* [Bug 3604] Wrong param byte order passing into record_raw_stats() in
 +      ntp_io.c <perlinger@ntp.org>
 +  - fixed byte and paramter order as suggested by wei6410@sina.com 
 +* [Bug 3601] Tests fail to link on platforms with ntp_cv_gc_sections_runs=no <perlinger@ntp.org>
 +* [Bug 3599] Build fails on linux-m68k due to alignment issues <perlinger@ntp.org>
 +  - added padding as suggested by John Paul Adrian Glaubitz 
 +* [Bug 3594] ntpd discards messages coming through nmead <perlinger@ntp.org>
 +* [Bug 3593] ntpd discards silently nmea messages after the 5th string <perlinger@ntp.org>
 +* [Bug 3590] Update refclock_oncore.c to the new GPS date API <perlinger@ntp.org>
 +* [Bug 3585] Unity tests mix buffered and unbuffered output <perlinger@ntp.org>
 +  - stdout+stderr are set to line buffered during test setup now
 +* [Bug 3583] synchronization error <perlinger@ntp.org>
 +  - set clock to base date if system time is before that limit
 +* [Bug 3582] gpsdjson refclock fudgetime1 adjustment is doubled <perlinger@ntp.org>
 +* [Bug 3580] Possible bug ntpq-subs (NULL dereference in dogetassoc) <perlinger@ntp.org>
 +  - Reported by Paulo Neves
 +* [Bug 3577] Update refclock_zyfer.c to the new GPS date API <perlinger@ntp.org>
 +  - also updates for refclock_nmea.c and refclock_jupiter.c
 +* [Bug 3576] New GPS date function API <perlinger@ntp.org>
 +* [Bug 3573] nptdate: missleading error message <perlinger@ntp.org>
 +* [Bug 3570] NMEA driver docs: talker ID not mentioned, typo <perlinger@ntp.org>
 +* [Bug 3569] cleanup MOD_NANO/STA_NANO handling for 'ntpadjtimex()' <perlinger@ntp.org>
 +  - sidekick: service port resolution in 'ntpdate'
 +* [Bug 3550] Reproducible build: Respect SOURCE_DATE_EPOCH <perlinger@ntp.org>
 +  - applied patch by Douglas Royds
 +* [Bug 3542] ntpdc monlist parameters cannot be set <perlinger@ntp.org>
 +* [Bug 3533] ntpdc peer_info ipv6 issues <perlinger@ntp.org>
 +  - applied patch by Gerry Garvey
 +* [Bug 3531] make check: test-decodenetnum fails <perlinger@ntp.org>
 +  - try to harden 'decodenetnum()' against 'getaddrinfo()' errors
 +  - fix wrong cond-compile tests in unit tests
 +* [Bug 3517] Reducing build noise <perlinger@ntp.org>
 +* [Bug 3516] Require tooling from this decade <perlinger@ntp.org>
 +  - patch by Philipp Prindeville
 +* [Bug 3515] Refactor ntpdmain() dispatcher loop and group common code <perlinger@ntp.org>
 +  - patch by Philipp Prindeville
 +* [Bug 3511] Get rid of AC_LANG_SOURCE() warnings <perlinger@ntp.org>
 +  - patch by Philipp Prindeville
 +* [Bug 3510] Flatten out the #ifdef nesting in ntpdmain() <perlinger@ntp.org>
 +  - partial application of patch by Philipp Prindeville
 +* [Bug 3491] Signed values of LFP datatypes should always display a sign
 +  - applied patch by Gerry Garvey & fixed unit tests <perlinger@ntp.org>
 +* [Bug 3490] Patch to support Trimble Resolution Receivers <perlinger@ntp.org>
 +  - applied (modified) patch by Richard Steedman
 +* [Bug 3473] RefID of refclocks should always be text format <perlinger@ntp.org>
 +  - applied patch by Gerry Garvey (with minor formatting changes)
 +* [Bug 3132] Building 4.2.8p8 with disabled local libopts fails <perlinger@ntp.org>
 +  - applied patch by Miroslav Lichvar
 +* [Bug 3094] ntpd trying to listen for broadcasts on a completely ipv6 network
 +  <perlinger@ntp.org>
 +* [Bug 2420] ntpd doesn't run and exits with retval 0 when invalid user
 +             is specified with -u <perlinger@ntp.org>
 +  - monitor daemon child startup & propagate exit codes
 +* [Bug 1433] runtime check whether the kernel really supports capabilities
 +  - (modified) patch by Kurt Roeckx <perlinger@ntp.org>
 +* Clean up sntp/networking.c:sendpkt() error message.  <stenn@ntp.org>
 +* Provide more detail on unrecognized config file parser tokens. <stenn@ntp.org>
 +* Startup log improvements. <stenn@ntp.org>
 +* Update the copyright year.
 +* html/confopt.html: cleanup. <stenn@ntp.org>
 +
 +---
 +(4.2.8p13) 2019/03/07 Released by Harlan Stenn <stenn@ntp.org>
 +
 +* [Sec 3565] Crafted null dereference attack in authenticated
 +           mode 6 packet <perlinger@ntp.org>
 +  - reported by Magnus Stubman
 +* [Bug 3560] Fix build when HAVE_DROPROOT is not defined <perlinger@ntp.org>
 +  - applied patch by Ian Lepore
 +* [Bug 3558] Crash and integer size bug <perlinger@ntp.org>
 +  - isolate and fix linux/windows specific code issue
 +* [Bug 3556] ntp_loopfilter.c snprintf compilation warnings <perlinger@ntp.org>
 +  - provide better function for incremental string formatting
 +* [Bug 3555] Tidy up print alignment of debug output from ntpdate <perlinger@ntp.org>
 +  - applied patch by Gerry Garvey
 +* [Bug 3554] config revoke stores incorrect value <perlinger@ntp.org>
 +  - original finding by Gerry Garvey, additional cleanup needed
 +* [Bug 3549] Spurious initgroups() error message <perlinger@ntp.org>
 +  - patch by Christous Zoulas
 +* [Bug 3548] Signature not verified on windows system <perlinger@ntp.org>
 +  - finding by Chen Jiabin, plus another one by me
 +* [Bug 3541] patch to fix STA_NANO struct timex units <perlinger@ntp.org>
 +  - applied patch by Maciej Szmigiero
 +* [Bug 3540] Cannot set minsane to 0 anymore <perlinger@ntp.org>
 +  - applied patch by Andre Charbonneau
 +* [Bug 3539] work_fork build fails when droproot is not supported <perlinger@ntp.org>
 +  - applied patch by Baruch Siach
 +* [Bug 3538] Build fails for no-MMU targets <perlinger@ntp.org>
 +  - applied patch by Baruch Siach
 +* [Bug 3535] libparse won't handle GPS week rollover <perlinger@ntp.org>
 +  - refactored handling of GPS era based on 'tos basedate' for
 +    parse (TSIP) and JUPITER clocks
 +* [Bug 3529] Build failures on Mac OS X 10.13 (High Sierra) <perlinger@ntp.org>
 +  - patch by Daniel J. Luke; this does not fix a potential linker
 +    regression issue on MacOS.
 +* [Bug 3527 - Backward Incompatible] mode7 clockinfo fudgeval2 packet
 +  anomaly <perlinger@ntp.org>, reported by GGarvey.
 +  - --enable-bug3527-fix support by HStenn
 +* [Bug 3526] Incorrect poll interval in packet <perlinger@ntp.org>
 +  - applied patch by Gerry Garvey
 +* [Bug 3471] Check for openssl/[ch]mac.h.  <perlinger@ntp.org>
 +  - added missing check, reported by Reinhard Max <perlinger@ntp.org>
 +* [Bug 1674] runtime crashes and sync problems affecting both x86 and x86_64
 +  - this is a variant of [bug 3558] and should be fixed with it
 +* Implement --disable-signalled-io
 +
 +---
 +(4.2.8p12) 2018/08/14 Released by Harlan Stenn <stenn@ntp.org>
 +
 +* [Sec 3505] CVE-2018-12327 - Arbitrary Code Execution Vulnerability
 +  - fixed stack buffer overflow in the openhost() command-line call
 +    of NTPQ/NTPDC <perlinger@ntp.org>
 +* [Sec 3012] noepeer tweaks.  <stenn@ntp.org>
 +* [Bug 3521] Fix a logic bug in the INVALIDNAK checks.  <stenn@ntp.org>
 +* [Bug 3509] Add support for running as non-root on FreeBSD, Darwin,
 +             other TrustedBSD platforms
 +  - applied patch by Ian Lepore <perlinger@ntp.org>
 +* [Bug 3506] Service Control Manager interacts poorly with NTPD <perlinger@ntp.org>
 +  - changed interaction with SCM to signal pending startup
 +* [Bug 3486] Buffer overflow in ntpq/ntpq.c:tstflags() <perlinger@ntp.org>
 +  - applied patch by Gerry Garvey
 +* [Bug 3485] Undefined sockaddr used in error messages in ntp_config.c <perlinger@ntp.org>
 +  - applied patch by Gerry Garvey
 +* [Bug 3484] ntpq response from ntpd is incorrect when REFID is null <perlinger@ntp.org>
 +  - rework of ntpq 'nextvar()' key/value parsing
 +* [Bug 3482] Fixes for compilation warnings (ntp_io.c & ntpq-subs.c) <perlinger@ntp.org>
 +  - applied patch by Gerry Garvey (with mods)
 +* [Bug 3480] Refclock sample filter not cleared on clock STEP <perlinger@ntp.org>
 +  - applied patch by Gerry Garvey
 +* [Bug 3479] ctl_putrefid() allows unsafe characters through to ntpq <perlinger@ntp.org>
 +  - applied patch by Gerry Garvey (with mods)
 +* [Bug 3476]ctl_putstr() sends empty unquoted string [...] <perlinger@ntp.org>
 +  - applied patch by Gerry Garvey (with mods); not sure if that's bug or feature, though
 +* [Bug 3475] modify prettydate() to suppress output of zero time <perlinger@ntp.org>
 +  - applied patch by Gerry Garvey
 +* [Bug 3474] Missing pmode in mode7 peer info response <perlinger@ntp.org>
 +  - applied patch by Gerry Garvey
 +* [Bug 3471] Check for openssl/[ch]mac.h.  HStenn.
 +  - add #define ENABLE_CMAC support in configure.  HStenn.
 +* [Bug 3470] ntpd4.2.8p11 fails to compile without OpenSSL <perlinger@ntp.org>
 +* [Bug 3469] Incomplete string compare [...] in is_refclk_addr <perlinger@ntp.org>
 +  - patch by Stephen Friedl
 +* [Bug 3467] Potential memory fault in ntpq [...] <perlinger@ntp.org>
 +  - fixed IO redirection and CTRL-C handling in ntq and ntpdc
 +* [Bug 3465] Default TTL values cannot be used <perlinger@ntp.org>
 +* [Bug 3461] refclock_shm.c: clear error status on clock recovery <perlinger@ntp.org>
 +  - initial patch by Hal Murray; also fixed refclock_report() trouble
 +* [Bug 3460] Fix typo in ntpq.texi, reported by Kenyon Ralph.  <stenn@ntp.org>
 +* [Bug 3456] Use uintptr_t rather than size_t to store an integer in a pointer
 +  - According to Brooks Davis, there was only one location <perlinger@ntp.org>
 +* [Bug 3449] ntpq - display "loop" instead of refid [...] <perlinger@ntp.org>
 +  - applied patch by Gerry Garvey
 +* [Bug 3445] Symmetric peer won't sync on startup <perlinger@ntp.org>
 +  - applied patch by Gerry Garvey
 +* [Bug 3442] Fixes for ntpdate as suggested by Gerry Garvey,
 +  with modifications
 +  New macro REFID_ISTEXT() which is also used in ntpd/ntp_control.c.
 +* [Bug 3434] ntpd clears STA_UNSYNC on start <perlinger@ntp.org>
 +  - applied patch by Miroslav Lichvar
 +* [Bug 3426] ntpdate.html -t default is 2 seconds.  Leonid Evdokimov.
 +* [Bug 3121] Drop root privileges for the forked DNS worker <perlinger@ntp.org>
 +  - integrated patch by  Reinhard Max
  * [Bug 2821] minor build issues <perlinger@ntp.org>
 - - applied patches by Christos Zoulas, including real bug fixes
 +  - applied patches by Christos Zoulas, including real bug fixes
 +* html/authopt.html: cleanup, from <stenn@ntp.org>
 +* ntpd/ntpd.c: DROPROOT cleanup.  <stenn@ntp.org>
 +* Symmetric key range is 1-65535.  Update docs.  <stenn@ntp.org>
 +* html/authentic.html: cleanup, from <stenn@ntp.org>
  
  ---
  (4.2.8p11) 2018/02/27 Released by Harlan Stenn <stenn@ntp.org>
Simple merge
Simple merge
Simple merge
Simple merge
index 1d7997c6aaf99bdbcb7a0957e4f7de5ee23d519d,7c5cd69b24f1d57052f411914852f04c6d3dad83..7a42b7212a220c669afe196dddbafc1a46e3efd9
@@@ -320,16 -325,12 +320,9 @@@ static int       nmead_open      (const char * dev
   * support functions by defining NMEA_WRITE_SUPPORT to non-zero...
   */
  #if NMEA_WRITE_SUPPORT
  static        void gps_send(int, const char *, struct peer *);
- # ifdef SYS_WINNT
- #  undef write        /* ports/winnt/include/config.h: #define write _write */
- extern int async_write(int, const void *, unsigned int);
- #  define write(fd, data, octets)     async_write(fd, data, octets)
- # endif /* SYS_WINNT */
  #endif /* NMEA_WRITE_SUPPORT */
  
 -static int32_t g_gpsMinBase;
 -static int32_t g_gpsMinYear;
 -
  /*
   * -------------------------------------------------------------------
   * Transfer vector
Simple merge
Simple merge
Simple merge
Simple merge