Bug 1254547 - (CVE-2015-5196, CVE-2015-7703) CVE-2015-7703 ntp: config command can be used to set the pidfile and drift file paths
CVE-2015-7703 ntp: config command can be used to set the pidfile and drift fi...
Status: CLOSED ERRATA
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
low Severity low
: ---
: ---
Assigned To: Red Hat Product Security
impact=low,public=20150825,reported=2...
: Reopened, Security
Depends On: 1256667 1296209 1317795
Blocks: 1254549 1323912
  Show dependency treegraph
 
Reported: 2015-08-18 07:23 EDT by Martin Prpič
Modified: 2016-11-06 00:13 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
It was found that NTP's :config command could be used to set the pidfile and driftfile paths without any restrictions. A remote attacker could use this flaw to overwrite a file on the file system with a file containing the pid of the ntpd process (immediately) or the current estimated drift of the system clock (in hourly intervals).
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-06 00:13:03 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Martin Prpič 2015-08-18 07:23:07 EDT
It was found that the :config command can be used to set the pidfile and driftfile paths without any restrictions. A remote attacker could use this flaw to overwrite a file on the file system with a file containing the pid of the ntpd process (immediately) or the current estimated drift of the system clock (in hourly intervals). For example:

ntpq -c ':config pidfile /tmp/ntp.pid'
ntpq -c ':config driftfile /tmp/ntp.drift'

In RHEL/Fedora ntpd is configured to drop root privileges, which limits the impact of this issue. Additionally, in the default NTP configuration, runtime configuration with ntpq or ntpdc is limited to localhost, further limiting the impact of this issue.

Acknowledgements:

This issue was discovered by Miroslav Lichvár of Red Hat.
Comment 3 Florian Weimer 2015-08-25 04:37:46 EDT
Created ntp tracking bugs for this issue:

Affects: fedora-all [bug 1256667]
Comment 5 Fedora Update System 2015-08-25 06:59:55 EDT
ntp-4.2.6p5-33.fc21 has been submitted as an update to Fedora 21. https://bodhi.fedoraproject.org/updates/FEDORA-2015-14211
Comment 6 Fedora Update System 2015-08-25 07:03:36 EDT
ntp-4.2.6p5-33.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-14212
Comment 7 Fedora Update System 2015-08-25 07:05:34 EDT
ntp-4.2.6p5-33.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-14213
Comment 8 Fedora Update System 2015-08-26 00:25:34 EDT
ntp-4.2.6p5-33.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update ntp'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-14213
Comment 9 Fedora Update System 2015-08-26 13:24:57 EDT
ntp-4.2.6p5-33.fc21 has been pushed to the Fedora 21 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update ntp'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-14211
Comment 10 Fedora Update System 2015-08-26 13:27:33 EDT
ntp-4.2.6p5-33.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update ntp'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-14212
Comment 11 Fedora Update System 2015-09-20 11:23:03 EDT
ntp-4.2.6p5-33.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 12 Fedora Update System 2015-10-11 22:18:24 EDT
ntp-4.2.6p5-33.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
Comment 13 Martin Prpič 2015-10-23 03:00:35 EDT
Note that this is the same issue as:

 Bug 2902 : CVE-2015-7703 configuration directives "pidfile" and "driftfile" should only be allowed locally. (RedHat) 

in http://support.ntp.org/bin/view/Main/SecurityNotice#October_2015_NTP_Security_Vulner

CVE reject request has been sent:

http://seclists.org/oss-sec/2015/q4/137
Comment 14 Martin Prpič 2015-10-29 07:13:39 EDT
(In reply to Martin Prpic from comment #13)
> Note that this is the same issue as:
> 
>  Bug 2902 : CVE-2015-7703 configuration directives "pidfile" and "driftfile"
> should only be allowed locally. (RedHat) 
> 
> in
> http://support.ntp.org/bin/view/Main/
> SecurityNotice#October_2015_NTP_Security_Vulner
> 
> CVE reject request has been sent:
> 
> http://seclists.org/oss-sec/2015/q4/137

MITRE decided to reject CVE-2015-5196; changing this bug to reference CVE-2015-7703 instead:

http://seclists.org/oss-sec/2015/q4/146
Comment 15 Tomas Hoger 2015-10-29 09:05:57 EDT
We should keep the rejected CVE here as alias.
Comment 16 Fedora Update System 2015-11-04 17:50:12 EST
ntp-4.2.6p5-34.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.
Comment 17 Martin Prpič 2015-11-09 03:48:08 EST
Mitigation:

Disable remote runtime configuration with ntpq or ntpdc. In the default NTP configuration on Red Hat Enterprise Linux, runtime configuration with ntpq or ntpdc is limited to localhost.
Comment 20 errata-xmlrpc 2016-05-10 16:17:06 EDT
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 6

Via RHSA-2016:0780 https://rhn.redhat.com/errata/RHSA-2016-0780.html
Comment 21 errata-xmlrpc 2016-11-03 15:32:43 EDT
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2016:2583 https://rhn.redhat.com/errata/RHSA-2016-2583.html

Note You need to log in before you can comment on or make changes to this bug.