Todd Miller sudo up to 1.8.20 on Linux TTY get_process_ttyname race condition

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
6.7$0-$5k0.00

Summaryinfo

A vulnerability identified as critical has been detected in Todd Miller sudo up to 1.8.20 on Linux. This affects the function get_process_ttyname of the component TTY Handler. The manipulation leads to Local Privilege Escalation. This vulnerability is listed as CVE-2017-1000367. The attack must be carried out locally. In addition, an exploit is available. You should upgrade the affected component.

Detailsinfo

A vulnerability, which was classified as critical, has been found in Todd Miller sudo up to 1.8.20 on Linux (Operating System Utility Software). This issue affects the function get_process_ttyname of the component TTY Handler. The manipulation with an unknown input leads to a local privilege escalation vulnerability. Using CWE to declare the problem leads to CWE-362. The product contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently. Impacted is confidentiality, integrity, and availability.

The bug was discovered 05/30/2017. The weakness was presented 05/30/2017 with Qualys as Potential overwrite of arbitrary files on Linux as confirmed advisory (Website). The advisory is shared at sudo.ws. The identification of this vulnerability is CVE-2017-1000367. An attack has to be approached locally. A simple authentication is required for exploitation. Technical details as well as a public exploit are known. The advisory points out:

On Linux systems, sudo parses the /proc/[pid]/stat file to determine the device number of the process's tty (field 7). The fields in the file are space-delimited, but it is possible for the command name (field 2) to include spaces, which sudo does not account for. A user with sudo privileges can cause sudo to use a device number of the user's choosing by creating a symbolic link from the sudo binary to a name that contains a space, followed by a number. If SELinux is enabled on the system and sudo was built with SELinux support, a user with sudo privileges may be able to to overwrite an arbitrary file. This can be escalated to full root access by rewriting a trusted file such as /etc/shadow or even /etc/sudoers.

A public exploit has been developed by Qualys Corporation in ANSI C and been published 3 weeks after the advisory. The exploit is available at exploit-db.com. It is declared as proof-of-concept. The vulnerability scanner Nessus provides a plugin with the ID 100644 (Amazon Linux AMI : sudo (ALAS-2017-843)), which helps to determine the existence of the flaw in a target environment. It is running in the context l. The commercial vulnerability scanner Qualys is able to test this issue with plugin 170081 (SUSE Enterprise Linux Security Update for sudo (SUSE-SU-2017:1626-1)).

Upgrading to version 1.8.20p1 eliminates this vulnerability. A possible mitigation has been published 1 weeks after the disclosure of the vulnerability.

The vulnerability is also documented in the databases at Exploit-DB (42183), Tenable (100644), SecurityFocus (BID 98745†) and SecurityTracker (ID 1038582†). seclists.org is providing further details. See VDB-101975 for similar entry. Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Not Affected

  • sudo up to 1.8.6p6

Productinfo

Type

Vendor

Name

Version

License

CPE 2.3info

CPE 2.2info

Video

CVSSv4info

VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 7.1
VulDB Meta Temp Score: 6.7

VulDB Base Score: 7.8
VulDB Temp Score: 7.0
VulDB Vector: 🔍
VulDB Reliability: 🔍

NVD Base Score: 6.4
NVD Vector: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍

NVD Base Score: 🔍

Exploitinginfo

Class: Race condition
CWE: CWE-362
CAPEC: 🔍
ATT&CK: 🔍

Physical: Partially
Local: Yes
Remote: No

Availability: 🔍
Access: Public
Status: Proof-of-Concept
Author: Qualys Corporation
Programming Language: 🔍
Download: 🔍

EPSS Score: 🔍
EPSS Percentile: 🔍

Price Prediction: 🔍
Current Price Estimation: 🔍

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Nessus ID: 100644
Nessus Name: Amazon Linux AMI : sudo (ALAS-2017-843)
Nessus File: 🔍
Nessus Risk: 🔍
Nessus Family: 🔍
Nessus Context: 🔍

OpenVAS ID: 703867
OpenVAS Name: Debian Security Advisory DSA 3867-1 (sudo - security update)
OpenVAS File: 🔍
OpenVAS Family: 🔍

Qualys ID: 🔍
Qualys Name: 🔍

Exploit-DB: 🔍

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

Reaction Time: 🔍
0-Day Time: 🔍
Exposure Time: 🔍
Exploit Delay Time: 🔍

Upgrade: sudo 1.8.20p1

Timelineinfo

06/05/2017 🔍
05/30/2017 +17082 days 🔍
05/30/2017 +0 days 🔍
05/30/2017 +0 days 🔍
05/30/2017 +0 days 🔍
05/31/2017 +1 days 🔍
06/05/2017 +5 days 🔍
06/06/2017 +1 days 🔍
06/07/2017 +1 days 🔍
06/14/2017 +7 days 🔍
06/14/2017 +0 days 🔍
06/25/2024 +2568 days 🔍

Sourcesinfo

Advisory: Potential overwrite of arbitrary files on Linux
Researcher: Qualys Security
Organization: Qualys
Status: Confirmed
Confirmation: 🔍

CVE: CVE-2017-1000367 (🔍)
GCVE (CVE): GCVE-0-2017-1000367
GCVE (VulDB): GCVE-100-101873

OVAL: 🔍

SecurityFocus: 98745 - Sudo '/src/ttyname.c' Local Privilege Escalation Vulnerability
SecurityTracker: 1038582

scip Labs: https://www.scip.ch/en/?labs.20161013
Misc.: 🔍
See also: 🔍

Entryinfo

Created: 05/31/2017 08:34
Updated: 06/25/2024 15:41
Changes: 05/31/2017 08:34 (100), 10/20/2019 17:16 (6), 12/26/2020 07:12 (3), 06/25/2024 15:41 (16)
Complete: 🔍
Cache ID: 216::103

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Might our Artificial Intelligence support you?

Check our Alexa App!