Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1434011 - (CVE-2017-6451) CVE-2017-6451 ntp: Improper use of snprintf() in mx4200_send()
CVE-2017-6451 ntp: Improper use of snprintf() in mx4200_send()
Status: CLOSED NOTABUG
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=20170321,reported=2...
: Security
Depends On: 1435163
Blocks: 1434021
  Show dependency treegraph
 
Reported: 2017-03-20 10:29 EDT by Adam Mariš
Modified: 2017-03-30 21:16 EDT (History)
5 users (show)

See Also:
Fixed In Version: ntp 4.2.8p10
Doc Type: If docs needed, set a value
Doc Text:
A vulnerability was found in NTP, in the legacy MX4200 refclock implementation. If this refclock was compiled in and used, an attacker may be able to induce stack overflow, leading to a crash or potential code execution.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-03-30 21:16:57 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 Adam Mariš 2017-03-20 10:29:53 EDT
The legacy MX4200 refclock is only built if it is specifically enabled, and furthermore additional code changes are required to compile and use it. But it uses the libc functions snprintf() and vsnprintf() incorrectly, which can lead to an out-of-bounds memory write due to an improper handling of the return value of snprintf()/vsnprintf(). Since the return value is used as an iterator and it can be larger than the buffer's size, it is possible for the iterator to point somewhere outside of the allocated buffer space.  This results in an out-of-bound memory write. This behavior can be leveraged to overwrite a saved instruction pointer on the stack and gain control over the execution flow.

During testing it was not possible to identify any malicious usage for this vulnerability. Specifically, no way for an attacker to exploit this vulnerability was ultimately unveiled. However, it has the potential to be exploited, so the code should be fixed.

Mitigation:

Properly monitor your ntpd instances, and auto-restart ntpd (without -g) if it stops running.
Comment 1 Adam Mariš 2017-03-20 10:29:58 EDT
Acknowledgments:

Name: the NTP project
Upstream: Cure53
Comment 2 Doran Moppert 2017-03-21 02:06:38 EDT
NTP on Red Hat Enterprise Linux 5 through 7 is built with the MX4200 refclock disabled.
Comment 4 Adam Mariš 2017-03-23 06:08:50 EDT
Created ntp tracking bugs for this issue:

Affects: fedora-all [bug 1435163]

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