Bug 1300270 (CVE-2015-7978) - CVE-2015-7978 ntp: stack exhaustion in recursive traversal of restriction list
Summary: CVE-2015-7978 ntp: stack exhaustion in recursive traversal of restriction list
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2015-7978
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1300277 1301972 1317795
Blocks: 1297474 1323912
TreeView+ depends on / blocked
 
Reported: 2016-01-20 11:42 UTC by Martin Prpič
Modified: 2021-02-17 04:29 UTC (History)
3 users (show)

Fixed In Version: ntp 4.2.8p6
Doc Type: Bug Fix
Doc Text:
A stack-based buffer overflow flaw was found in the way ntpd processed 'ntpdc reslist' commands that queried restriction lists with a large amount of entries. A remote attacker could use this flaw to crash ntpd.
Clone Of:
Environment:
Last Closed: 2016-11-06 04:14:45 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:0780 0 normal SHIPPED_LIVE Moderate: ntp security and bug fix update 2016-05-10 22:35:43 UTC
Red Hat Product Errata RHSA-2016:2583 0 normal SHIPPED_LIVE Moderate: ntp security and bug fix update 2016-11-03 12:08:36 UTC

Description Martin Prpič 2016-01-20 11:42:55 UTC
A stack-based buffer overflow was found in the way ntpd processed 'ntpdc reslist' commands that queried restriction lists with a large amount of entries. A remote attacker could use this flaw to crash the ntpd process.

Upstream patch (which also addresses CVE-2015-7977):

https://github.com/ntp-project/ntp/commit/8a0c765f3c47633fa262356b0818788d1cf249b1

Comment 2 Martin Prpič 2016-01-20 12:02:01 UTC
Created ntp tracking bugs for this issue:

Affects: fedora-all [bug 1300277]

Comment 3 Martin Prpič 2016-01-21 14:12:34 UTC
Similar to CVE-2015-7977, to exploit this issue, the attacker has to rely on two factors:

* ntpd to be configured to receive mode 7 packets. By default on Red Hat Enterprise Linux, ntpd is configured to receive this packets only on localhost.

* the restriction list must contain a large number of entries (more than 5000).

When the number of entries is large enough, ntpd will crash due to stack exhaustion while recursively traversing the list.

Since the attacker has no way of influencing the size of the restriction list by adding more entries, it is quite unlikely to exploit this issue.

Having such a large number of restriction entries would also be an uncommon configuration since it would be more practical to restrict connecting clients via other means (e.g. iptables) should the system require it.

Statement:

This issue affects the versions of ntp as shipped with Red Hat Enterprise Linux 5, 6, and 7. Red Hat Product Security has rated this issue as having Moderate security impact. A future update may address this issue in Red Hat Enterprise Linux 6 and 7. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.

Comment 4 Martin Prpič 2016-01-21 14:12:49 UTC
Mitigation:

Keep the number of restriction list entries in ntp.conf lower than 500.

Comment 6 Fedora Update System 2016-01-30 18:21:20 UTC
ntp-4.2.6p5-36.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2016-02-21 02:24:51 UTC
ntp-4.2.6p5-36.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 9 errata-xmlrpc 2016-05-10 20:18:28 UTC
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 10 errata-xmlrpc 2016-11-03 19:33:33 UTC
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.