Dark Reading is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them.Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Application Security

1/27/2021
04:55 PM
Connect Directly
Twitter
LinkedIn
RSS
E-Mail
50%
50%

Critical Vulnerability Patched in 'sudo' Utility for Unix-Like OSes

Flaw exists in versions of sudo going back nearly 10 years; USCYBERCOM recommends organizations patch immediately.

The maintainer of sudo, a utility in nearly all Unix and Linux-based operating systems, this week patched a critical buffer overflow vulnerability in the program that gives unauthenticated local users a way to gain root privileges on a host system.

Qualys security researchers who discovered the nearly 10-year-old bug (CVE-2021-3156) say it was first introduced in July 2011 and impacts all versions of sudo from 1.8.2 to 1.8.31p2 and 1.9.0 through 1.9.5p1.

Related Content:

DreamBus, FreakOut Botnets Pose New Threat to Linux Systems

Special Report: 2021 Top Enterprise IT Trends

New From The Edge: Learn SAML: The Language You Don't Know You're Already Speaking

The researchers were able to independently verify the vulnerability and exploit it in multiple ways to gain root privileges on Debian 10 with sudo 1.8.27; Ubuntu 20.04 and sudo 1.8.31; and Fedora 33 with sudo 1.9.2, according to Qualys. Other operating systems and distributions are likely vulnerable to the same issue.

No mitigations are available for the threat. Qualys recommends that all organizations using Unix and Linux distributions with sudo-enabled in them immediately implement vendor supplied patches or upgrade to sudo 1.9.5p2, the latest version of the utility. It was released this week.

"Patching is the only option," says Mehul Revankar, vice president of product management and engineering at Qualys.

The seriousness of the bug prompted a tweet from US Cyber Command (USCYBERCOM) Wednesday, urging organizations to patch as soon as possible. "This is a far more dangerous #Sudo vulnerability than seen in the recent past," it tweeted.

To test whether a system is vulnerable, an admin should log into the system as a non-root user and run the "sudoedit -s /" command.

"If the system is vulnerable, it will respond with an error that starts with 'sudoedit:'," Revankar says. "If the system is patched, it will respond with an error that starts with 'usage:'."

Sudo is a utility that administrators can use to delegate root-level admin authority to specific users or groups of users while copiously logging all their commands and activities. Administrators can use the utility to enable or restrict what commands a user can execute on a host system and to centrally manage user privileges on a per-host basis.

Software engineer Todd Miller, who currently maintains sudo, on Tuesday said the heap-based buffer overflow bug exists in code that executes when sudo runs a command in shell mode via the use of -s and –I options. (Read here for details.) By itself, the bug is harmless. However, the presence of another bug in sudo's command-line parsing code makes the discovery of the new issue dangerous, he notes.

"I'd speculate that it remained undiscovered for so long because it is a combination of two bugs," Revankar says. "Thus, people might have found one bug but disregarded it as useless because they did not find the other."

An attacker would need local access to a vulnerable system in order to exploit the vulnerability. In many instances, this would mitigate the seriousness of the flaw because an adversary that already has access to a system can do a lot of damage with that access.

What makes this flaw dangerous is that an unauthenticated attacker can use it to escalate privileges even if not listed in the "sudoers" file, which allocates admin rights to specific individuals.

"The user does not need to be a privileged user, a local user, or be a part of sudoers list," Revankar says. "For example, even account 'nobody' can exploit the issue. That's why this is so critical."

A local vulnerability usually doesn't require panic since an attacker needs another vulnerability to gain access to the system first, adds Kelly Shortridge, vice president of product strategy at Capsule8.

"In this case, aside from the vulnerability being present for roughly a decade, sudo is a utility that is available by default in most Linux distributions – which makes for a huge potential footprint."

All that is required for an attacker to exploit the vulnerability is shell mode and the presence of a sudoers policy in an organization's Linux infrastructure, she says.

Shortridge says enterprises with a containerized production environment are somewhat protected against the bug.

"If an attacker successfully exploits this vulnerability, they will gain root access in the container but not in the underlying host itself," she notes.

Jai Vijayan is a seasoned technology reporter with over 20 years of experience in IT trade journalism. He was most recently a Senior Editor at Computerworld, where he covered information security and data privacy issues for the publication. Over the course of his 20-year ... View Full Bio
 

Recommended Reading:

Comment  | 
Print  | 
More Insights
Comments
Threaded  |  Newest First  |  Oldest First
Commentary
Cyberattacks Are Tailored to Employees ... Why Isn't Security Training?
Tim Sadler, CEO and co-founder of Tessian,  6/17/2021
Edge-DRsplash-10-edge-articles
7 Powerful Cybersecurity Skills the Energy Sector Needs Most
Pam Baker, Contributing Writer,  6/22/2021
News
Microsoft Disrupts Large-Scale BEC Campaign Across Web Services
Kelly Sheridan, Staff Editor, Dark Reading,  6/15/2021
Register for Dark Reading Newsletters
White Papers
Video
Cartoon
Current Issue
The State of Cybersecurity Incident Response
In this report learn how enterprises are building their incident response teams and processes, how they research potential compromises, how they respond to new breaches, and what tools and processes they use to remediate problems and improve their cyber defenses for the future.
Flash Poll
How Enterprises are Developing Secure Applications
How Enterprises are Developing Secure Applications
Recent breaches of third-party apps are driving many organizations to think harder about the security of their off-the-shelf software as they continue to move left in secure software development practices.
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
CVE-2021-34390
PUBLISHED: 2021-06-22
Trusty TLK contains a vulnerability in the NVIDIA TLK kernel function where a lack of checks allows the exploitation of an integer overflow on the size parameter of the tz_map_shared_mem function.
CVE-2021-34391
PUBLISHED: 2021-06-22
Trusty TLK contains a vulnerability in the NVIDIA TLK kernel�s tz_handle_trusted_app_smc function where a lack of integer overflow checks on the req_off and param_ofs variables leads to memory corruption of critical kernel structures.
CVE-2021-34392
PUBLISHED: 2021-06-22
Trusty TLK contains a vulnerability in the NVIDIA TLK kernel where an integer overflow in the tz_map_shared_mem function can bypass boundary checks, which might lead to denial of service.
CVE-2021-34393
PUBLISHED: 2021-06-22
Trusty contains a vulnerability in TSEC TA which deserializes the incoming messages even though the TSEC TA does not expose any command. This vulnerability might allow an attacker to exploit the deserializer to impact code execution, causing information disclosure.
CVE-2021-34394
PUBLISHED: 2021-06-22
Trusty contains a vulnerability in all TAs whose deserializer does not reject messages with multiple occurrences of the same parameter. The deserialization of untrusted data might allow an attacker to exploit the deserializer to impact code execution.