Lucene search

K
talosTalos IntelligenceTALOS-2015-0063
HistoryOct 21, 2015 - 12:00 a.m.

Network Time Protocol ntpq atoascii Memory Corruption Vulnerability

2015-10-2100:00:00
Talos Intelligence
www.talosintelligence.com
17

5.9 Medium

CVSS3

Attack Vector

NETWORK

Attack Complexity

HIGH

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

NONE

Integrity Impact

NONE

Availability Impact

HIGH

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

4.3 Medium

CVSS2

Access Vector

NETWORK

Access Complexity

MEDIUM

Authentication

NONE

Confidentiality Impact

NONE

Integrity Impact

NONE

Availability Impact

PARTIAL

AV:N/AC:M/Au:N/C:N/I:N/A:P

0.037 Low

EPSS

Percentile

91.7%

Talos Vulnerability Report

TALOS-2015-0063

Network Time Protocol ntpq atoascii Memory Corruption Vulnerability

October 21, 2015
CVE Number

CVE-2015-7852

Description

A potential off by one vulnerability exists in the cookedprint functionality of ntpq. A specially crafted buffer could cause a buffer overflow potentially resulting in null byte being written out of bounds.

Tested Versions

ntp 4.2.8p2

Product URLs

<http://www.ntp.org>

Details

At line 3330 in ntpq.c, the atoascii function will be called to transform data into printable ascii (i.e. characters below 127):

atoascii( value, MAXVALLEN, bv, sizeof(bv));
	if (output_raw != '*') {
		len = strlen(bv);
		bv[len] = output_raw;
		bv[len+1] = '\0';
	}

The function atoascii won’t write more than sizeof(bv) bytes into bv and will ensure NULL termination if it runs out of space in bv. Depending on the specific character in the value parameter, it will write between 1 and 2 characters to bv. If bv is filled in atoascii, it will be NULL terminated at its final byte. This means that len = strlen(bv) will return the size of the buffer-1. Accessing the buffer via len will overwrite the NULL byte with output_raw. However if the buffer is full because it ran out of space during the atoascii function, then len+1 will equal 4096, resulting in an off by on the buffer.

Credit

Yves Younan and Aleksander Nikolich of Cisco Talos


Vulnerability Reports Next Report

TALOS-2015-0064

Previous Report

TALOS-2015-0062

5.9 Medium

CVSS3

Attack Vector

NETWORK

Attack Complexity

HIGH

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

NONE

Integrity Impact

NONE

Availability Impact

HIGH

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

4.3 Medium

CVSS2

Access Vector

NETWORK

Access Complexity

MEDIUM

Authentication

NONE

Confidentiality Impact

NONE

Integrity Impact

NONE

Availability Impact

PARTIAL

AV:N/AC:M/Au:N/C:N/I:N/A:P

0.037 Low

EPSS

Percentile

91.7%