Bug 1082063 - start-ntpd passes invalid command line flag `-l' to modprobe(8)
start-ntpd passes invalid command line flag `-l' to modprobe(8)
Status: RESOLVED FIXED
Classification: openSUSE
Product: openSUSE Distribution
Classification: openSUSE
Component: Basesystem
Leap 42.3
Other Other
: P5 - None : Normal (vote)
: ---
Assigned To: Reinhard Max
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-02-21 17:05 UTC by Archie Cobbs
Modified: 2018-10-18 17:29 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Archie Cobbs 2018-02-21 17:05:14 UTC
My system has:

ntp-4.2.8p10-30.1.x86_64
kmod-compat-17-13.1.x86_64

The ntp package contains /usr/sbin/start-ntpd which has this on line 63:

      if test -z "$(/sbin/modprobe -l rtc_cmos)" ; then

However, "-l" is not a valid flag for modprobe(8), so this results in an error:

systemctl status -l ntpd
● ntpd.service - NTP Server Daemon
   Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; vendor preset: disabled)
  Drop-In: /run/systemd/generator/ntpd.service.d
           └─50-insserv.conf-$time.conf
   Active: active (running) since Wed 2018-02-21 09:39:20 CST; 1h 21min ago
     Docs: man:ntpd(1)
  Process: 25240 ExecStart=/usr/sbin/start-ntpd start (code=exited, status=0/SUCCESS)
 Main PID: 25267 (ntpd)
    Tasks: 2 (limit: 512)
   CGroup: /system.slice/ntpd.service
           ├─25267 /usr/sbin/ntpd -p /var/run/ntp/ntpd.pid -g -u ntp:ntp -c /etc/ntp.conf
           └─25268 ntpd: asynchronous dns resolver                                       

Feb 21 09:39:20 demo start-ntpd[25240]: Time synchronized with time1.google.com
Feb 21 09:39:20 demo start-ntpd[25240]: /sbin/modprobe: invalid option -- 'l'
Feb 21 09:39:20 demo start-ntpd[25240]: hwclock: Cannot access the Hardware Clock via any known method.
Feb 21 09:39:20 demo start-ntpd[25240]: hwclock: Use the --debug option to see the details of our search for an access method.

This issue occurs on a Linode virtual server running their Linux kernel 4.14.17-x86_64-linode99.
Comment 1 Andreas Stieger 2018-02-21 17:29:45 UTC
(In reply to Archie Cobbs from comment #0)
> The ntp package contains /usr/sbin/start-ntpd which has this on line 63:
> 
>       if test -z "$(/sbin/modprobe -l rtc_cmos)" ; then
> 
> However, "-l" is not a valid flag for modprobe(8), so this results in an
> error:
[...]
> Feb 21 09:39:20 demo start-ntpd[25240]: /sbin/modprobe: invalid option -- 'l'

Is this really an error or just informational?
Comment 2 Archie Cobbs 2018-02-21 17:48:09 UTC
(In reply to Andreas Stieger from comment #1)
> > Feb 21 09:39:20 demo start-ntpd[25240]: /sbin/modprobe: invalid option -- 'l'
> 
> Is this really an error or just informational?

Depends on what you mean by "really an error". 

It's definitely a bug - modprobe(8) does not accept the "-l" flag.

Perhaps the better question is "What is the severity of this error?"

Honestly I don't know as I'm not a time/clock expert.

Looks to me like the script might take the wrong branch due to this bug... the modprobe(8) output will always be empy (stderr only), so the "test -z" will always return true, so all the subsequent code will never run.

Presumably that subsequent code is there because in some cases it should be run; so in all those cases this script does the wrong thing.
Comment 3 Reinhard Max 2018-02-22 08:23:00 UTC
I think this whole block from the line containing "modprobe -l" to the end of the update_cmos function is old cruft that can go away, because we don't seem to ship rtc_cmos as a module anymore and hence checking for existence of the module and loading it if it exists aren't needed.

Next is, the script only gets to that point on your Linode, because the preceeding test for the existence of /dev/rtc fails as linodes apparently do not emulate a CMOS RTC.

But given that the whole function is about writing the system time to the CMOS clock, which doesn't make sense if no CMOS clock exists, the error doesn't have any impact on the operation of ntpd itself on your system.

I will change the code next time I touch the package to avoid the error in the future.
Comment 4 Swamp Workflow Management 2018-03-14 09:40:10 UTC
This is an autogenerated message for OBS integration:
This bug (1082063) was mentioned in
https://build.opensuse.org/request/show/586702 Factory / ntp
Comment 7 Reinhard Max 2018-04-05 16:33:58 UTC
Submitted to all relevant code streams.
Comment 8 Swamp Workflow Management 2018-04-16 19:10:45 UTC
SUSE-SU-2018:0956-1: An update that solves 6 vulnerabilities and has two fixes is now available.

Category: security (moderate)
Bug References: 1077445,1082063,1082210,1083417,1083420,1083422,1083424,1083426
CVE References: CVE-2016-1549,CVE-2018-7170,CVE-2018-7182,CVE-2018-7183,CVE-2018-7184,CVE-2018-7185
Sources used:
SUSE Linux Enterprise Server 12-SP3 (src):    ntp-4.2.8p11-64.3.2
SUSE Linux Enterprise Desktop 12-SP3 (src):    ntp-4.2.8p11-64.3.2
SUSE CaaS Platform ALL (src):    ntp-4.2.8p11-64.3.2
Comment 9 Swamp Workflow Management 2018-04-17 10:08:57 UTC
openSUSE-SU-2018:0970-1: An update that solves 6 vulnerabilities and has two fixes is now available.

Category: security (moderate)
Bug References: 1077445,1082063,1082210,1083417,1083420,1083422,1083424,1083426
CVE References: CVE-2016-1549,CVE-2018-7170,CVE-2018-7182,CVE-2018-7183,CVE-2018-7184,CVE-2018-7185
Sources used:
openSUSE Leap 42.3 (src):    ntp-4.2.8p11-31.3.1
Comment 10 Swamp Workflow Management 2018-05-29 19:08:07 UTC
SUSE-SU-2018:1464-1: An update that solves 6 vulnerabilities and has three fixes is now available.

Category: security (moderate)
Bug References: 1034892,1077445,1082063,1082210,1083417,1083420,1083422,1083424,1083426
CVE References: CVE-2016-1549,CVE-2018-7170,CVE-2018-7182,CVE-2018-7183,CVE-2018-7184,CVE-2018-7185
Sources used:
SUSE Linux Enterprise Server 12-LTSS (src):    ntp-4.2.8p11-46.26.2
Comment 11 Swamp Workflow Management 2018-06-20 19:08:46 UTC
SUSE-SU-2018:1765-1: An update that solves 6 vulnerabilities and has two fixes is now available.

Category: security (moderate)
Bug References: 1077445,1082063,1082210,1083417,1083420,1083422,1083424,1083426
CVE References: CVE-2016-1549,CVE-2018-7170,CVE-2018-7182,CVE-2018-7183,CVE-2018-7184,CVE-2018-7185
Sources used:
SUSE OpenStack Cloud 7 (src):    ntp-4.2.8p11-64.5.1
SUSE Linux Enterprise Server for SAP 12-SP2 (src):    ntp-4.2.8p11-64.5.1
SUSE Linux Enterprise Server for SAP 12-SP1 (src):    ntp-4.2.8p11-64.5.1
SUSE Linux Enterprise Server 12-SP3 (src):    ntp-4.2.8p11-64.5.1
SUSE Linux Enterprise Server 12-SP2-LTSS (src):    ntp-4.2.8p11-64.5.1
SUSE Linux Enterprise Server 12-SP1-LTSS (src):    ntp-4.2.8p11-64.5.1
SUSE Linux Enterprise Desktop 12-SP3 (src):    ntp-4.2.8p11-64.5.1
SUSE Enterprise Storage 4 (src):    ntp-4.2.8p11-64.5.1
SUSE CaaS Platform ALL (src):    ntp-4.2.8p11-64.5.1
Comment 12 Swamp Workflow Management 2018-10-18 17:29:36 UTC
SUSE-SU-2018:1765-2: An update that solves 6 vulnerabilities and has two fixes is now available.

Category: security (moderate)
Bug References: 1077445,1082063,1082210,1083417,1083420,1083422,1083424,1083426
CVE References: CVE-2016-1549,CVE-2018-7170,CVE-2018-7182,CVE-2018-7183,CVE-2018-7184,CVE-2018-7185
Sources used:
SUSE Linux Enterprise Server 12-SP2-BCL (src):    ntp-4.2.8p11-64.5.1