Package: ntpsec
Version: 1.2.2+dfsg1-1+deb12u1
Severity: important

Dear Maintainer,

It appears that ntpsec's ntpd returns corrupted values in the "filtdelay",
"filtoffset" and "filtdisp" peer variables visible via ntpq.

reproducer:

$ ntpq
ntpq> peers
(output elided)....
ntpq> rv &1 filtdelay filtoffset filtdisp

Expected output:
three lines of 8 numbers for each variable read, looking something like:

filtdelay=    17.10   17.20   12.35   14.43   14.71   13.64   14.70   14.46,
filtoffset=   +3.57   +1.58   +0.39   +0.02   +1.04   +0.59   +0.40   -0.56,
filtdisp=      0.00   15.89   31.37   47.39   63.08   78.60   94.13  109.65

Actual output is prefaced with garbage characters and repeated values from the
other variables:

filtdelay=M- M-W}M-HM-^?^? 0.48 0.48 0.47 0.36 0.48 0.45 0.49 0.37?,
filtoffset=M- M-W}M-HM-^?^? 0.48 0.48 0.47 0.36 0.48 0.45 0.49 0.37 -0.52 0.92 
1.32 0.93 1.03 0.45 1.02 2.04?,
filtdisp=M- M-W}M-HM-^?^? 0.48 0.48 0.47 0.36 0.48 0.45 0.49 0.37 -0.52 0.92 
1.32 0.93 1.03 0.45 1.02 2.04 0.00 15.95 31.31 47.42 63.18 78.90 95.03 110.45?

Why I think the bug is in ntpd and not in ntpq:

I see the expected output for these variables when using ntpsec's ntpq to
query another system, and I also see the erroneous output when using that
other system's ntpq to query the debian ntpsec ntpd.

-- System Information:
Debian Release: 12.2
  APT prefers stable-security
  APT policy: (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-13-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages ntpsec depends on:
ii  adduser                    3.134
ii  init-system-helpers        1.65.2
ii  libbsd0                    0.11.7-2
ii  libc6                      2.36-9+deb12u3
ii  libcap2                    1:2.66-4
ii  libssl3                    3.0.11-1~deb12u2
ii  lsb-base                   11.6
ii  netbase                    6.4
ii  python3                    3.11.2-1+b1
ii  python3-ntp                1.2.2+dfsg1-1+deb12u1
ii  sysvinit-utils [lsb-base]  3.06-4
ii  tzdata                     2023c-5

Versions of packages ntpsec recommends:
ii  cron [cron-daemon]  3.0pl1-162
ii  systemd             252.17-1~deb12u1

Versions of packages ntpsec suggests:
ii  apparmor       3.0.8-3
pn  certbot        <none>
ii  ntpsec-doc     1.2.2+dfsg1-1+deb12u1
pn  ntpsec-ntpviz  <none>

-- Configuration Files:
/etc/ntpsec/ntp.conf changed:
driftfile /var/lib/ntpsec/ntp.drift
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
restrict -4 default kod notrap nomodify nopeer noquery limited
restrict -6 default kod notrap nomodify nopeer noquery limited
restrict 127.0.0.1
restrict ::1
restrict source notrap nomodify noquery
restrict 192.168.0.0 mask 255.255.0.0 kod notrap nomodify nopeer limited
server hydra.hamachi.org iburst
server the-governor.hamachi.org iburst
server time.cloudflare.com iburst
server time.apple.com iburst
pool 2.us.pool.ntp.org iburst


-- no debconf information

Reply via email to