Bug 1434014 (CVE-2017-6460) - CVE-2017-6460 ntp: Buffer Overflow in ntpq when fetching reslist from a malicious ntpd
Summary: CVE-2017-6460 ntp: Buffer Overflow in ntpq when fetching reslist from a malic...
Keywords:
Status: CLOSED NOTABUG
Alias: CVE-2017-6460
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:
Blocks: 1434021
TreeView+ depends on / blocked
 
Reported: 2017-03-20 14:35 UTC by Adam Mariš
Modified: 2021-02-17 02:26 UTC (History)
5 users (show)

Fixed In Version: ntp 4.2.8p10, ntp 4.3.94
Doc Type: If docs needed, set a value
Doc Text:
A vulnerability was found in NTP, in the ntpq program. A malicious server could send a specially crafted response which would cause a stack buffer overflow, leading to a crash or potential code execution.
Clone Of:
Environment:
Last Closed: 2017-03-30 06:06:19 UTC


Attachments (Terms of Use)

Description Adam Mariš 2017-03-20 14:35:49 UTC
A stack buffer overflow in ntpq can be triggered by a malicious ntpd server when ntpq requests the restriction list from the server. This is due to a missing length check in the reslist() function. It occurs whenever the function parses the server's response and encounters a flagstr variable of an excessive length. The string will be copied into a fixed-size buffer, leading to an overflow on the function's stack-frame. Note well that this problem requires a malicious server, and affects ntpq, not ntpd.

Affects: All versions of ntpq, up to but not including ntp-4.2.8p10, and ntp-4.3.0 up to, but not including ntp-4.3.94.

Comment 1 Adam Mariš 2017-03-20 14:35:54 UTC
Acknowledgments:

Name: the NTP project
Upstream: Cure53

Comment 4 Adam Mariš 2017-03-23 10:08:59 UTC
Created ntp tracking bugs for this issue:

Affects: fedora-all [bug 1435163]

Comment 5 Doran Moppert 2017-03-30 06:05:52 UTC
This flaw affects the mode6 reslist command, which is not supported by ntp-4.2.6p5 or earlier in Red Hat Enterprise Linux or Fedora <= 25.


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