CVE-2020-8597: Buffer Overflow Vulnerability in Point-to-Point Protocol Daemon (pppd)
Multiple widely used Linux distributions are impacted by a critical flaw that has existed in pppd for 17 years.
On March 4, researchers at the CERT Coordination Center (CERT/CC) published vulnerability note #782301 for a critical vulnerability in the Point-to-Point Protocol Daemon (pppd) versions 2.4.2 through 2.4.8, with disclosure credited to Ilja van Sprundel of IOActive.
The Point-to-Point Protocol (PPP) is a full-duplex protocol that enables the encapsulation and transmission of basic data across Layer 2 or data-link services ranging from dial-up connections to DSL broadband to virtual private networks (VPNs) implementing SSL encryption. PPP is also used to implement IP and TCP over two directly connected nodes, as these protocols do not support point-to-point connections. pppd is a daemon on Unix-like operating systems used to manage PPP session establishment and session termination between two nodes.
CVE-2020-8597 is a buffer overflow vulnerability in pppd due to a logic flaw in the packet processor of the Extensible Authentication Protocol (EAP). An unauthenticated, remote attacker who sends a specially crafted EAP packet to a vulnerable PPP client or server could cause a denial-of-service condition or gain arbitrary code execution. As pppd works in conjunction with kernel drivers and often runs with high privileges such as system or even root, any code execution could also be run with these same privileges.
According to CERT/CC’s vulnerability note, the logic flaw exists in several EAP functions.
In the eap_request and eap_response functions, a pointer and length are received as input using the first byte as a type. If this type is EAPT_MD5CHAP(4), it looks at an embedded 1-byte length field. This check was implemented to ensure the embedded length is smaller than that of the entire packet length. And if the check passes successfully, then the hostname located after the embedded length is copied into a local stack buffer. The vulnerability is in the logic of how these functions parse the code. If the bounds check is incorrect and proceeds to copy memory with an arbitrary length of data, a stack buffer overflow is possible.
The eap_input function contains an additional flaw in its code that fails to validate if EAP was negotiated during the Link Control Protocol (LCP) phase within PPP. Essentially, regardless of whether the failure to validate was the result of an incorrect pre-shared passphrase during the LCP phase or due to a lack of support for EAP, an unauthenticated attacker could send an EAP packet that would be processed. The processing of this unverified EAP packet can result in a stack buffer overflow.
Proof of concept
At the time this blog post was published, there was no working proof-of-concept (PoC) for this vulnerability.
However, multiple GitHub repositories have been published that may soon host a working PoC. One appears to be a work-in-progress, while another claims that a PoC will be released for this vulnerability “in a week or two when things die down.”
The vulnerability was patched in eap.c on February 2. Various Linux distributions have since released updates to address the vulnerability in PPP and additional patches may be released in the coming days. The following is a list of known distribution releases that address this vulnerability:
|Debian Jessie LTS||2.4.6-3.1||DLA-2097-1|
|Debian Stretch, Debian Buster||2.4.7-1+4 2.4.7-2+4.1||DSA-4632-1|
|Ubuntu||19.10, 18.04 LTS, 16.04 LTS||USN-4288-1|
|Ubuntu||14.04 ESM 12.04 ESM||USN-4288-2|
|Red Hat Enterprise Linux||6||RHSA-2020:0631|
|Red Hat Enterprise Linux||7||RHSA-2020:0630|
|Red Hat Enterprise Linux||8||RHSA-2020:0634|
Additionally, Cisco has assigned CSCvs95534 as the bug ID associated with this vulnerability as it reviews the potential impact it may have on its products.
This is not an exhaustive list, and we anticipate more vendors will publish advisories as they determine the impact of this vulnerability on their products.
Identifying affected systems
A list of Tenable plugins to identify this vulnerability can be found here.
Get more information
Join Tenable's Security Response Team on the Tenable Community.
Learn more about Tenable, the first Cyber Exposure platform for holistic management of your modern attack surface.
Get a free 30-day trial of Tenable.io Vulnerability Management.
Are You Vulnerable to the Latest Exploits?
Enter your email to receive the latest cyber exposure alerts in your inbox.