Bug 1274263 (CVE-2015-7854) - CVE-2015-7854 ntp: password length memory corruption vulnerability
Summary: CVE-2015-7854 ntp: password length memory corruption vulnerability
Keywords:
Status: CLOSED NOTABUG
Alias: CVE-2015-7854
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: 1260670
TreeView+ depends on / blocked
 
Reported: 2015-10-22 11:32 UTC by Martin Prpič
Modified: 2021-02-17 04:48 UTC (History)
3 users (show)

Fixed In Version: ntp 4.2.8p4
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-10-23 07:53:27 UTC
Embargoed:


Attachments (Terms of Use)

Description Martin Prpič 2015-10-22 11:32:09 UTC
The following flaw was found in ntpd:

A potential buffer overflow vulnerability exists in the password management functionality of ntp. A specially crafted key file could cause a buffer overflow potentially resulting in memory being modified. An attacker could provide a malicious password to trigger this vulnerability.

External References:

http://talosintel.com/reports/TALOS-2015-0065/
http://support.ntp.org/bin/view/Main/SecurityNotice#October_2015_NTP_Security_Vulner

Comment 1 Martin Prpič 2015-10-23 07:53:27 UTC
Statement:

This issue did not affect the versions of ntp as shipped with Red Hat Enterprise Linux 5, 6, and 7.

Comment 2 Martin Prpič 2015-10-23 09:03:41 UTC
In version 4.2.6 and earlier of NTP (shipped with RHEL 5, 6, 7), the key size is written in an array rather than dynamically allocated memory (as happens in 4.2.8). The following code handles the size allocation and is not vulnerable to the reported buffer overflow:

sk->keylen = min(len, sizeof(sk->k.MD5_key));
memcpy(sk->k.MD5_key, key, sk->keylen);


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