Security

Research

'Alarming' security bugs lay low in Linux's needrestart utility for 10 years

Update now: Qualys says flaws give root to local users, 'easily exploitable', default in Ubuntu Server


Researchers at Qualys refuse to release exploit code for five bugs in the Linux world's needrestart utility that allow unprivileged local attackers to gain root access without any user interaction.

The security shop's Threat Research Unit (TRU) said it was able to develop a working exploit but wouldn't release it, describing the findings as "alarming." Regardless, they said the vulnerabilities are "easily exploitable" and urged admins to apply the recommended fixes promptly.

To be clear, the holes can be exploited by rogue and hijacked local users, or malware, already on a system to gain root access.

Saeed Abbasi, product manager at Qualys's TRU, disclosed the five vulnerabilities this week for the first time in a blog, although, according to experts, they were actually introduced in April 2014.

The vulnerabilities all lie in the needrestart utility, which, intuitively enough, is designed to determine if a restart is needed. For example, if a critical library is updated or an installation or other upgrade is made, it determines that a restart is necessary to bring in the changes and begins that reboot automatically if so.

The little tool is available separately and in various Linux distributions, and as Abbasi highlighted, is present by default in Ubuntu Server, at least.

Qualys's more detailed technical notes of the vulnerabilities explain that needrestart offers security benefits by identifying outdated source files, as these may contain bugs, while ironically also being the source of a nasty series of exploits.

"This exploit is achieved by manipulating an attacker-controlled environment variable that influences the Python/Ruby interpreter, passing unsanitized data to a library that expects safe input, thereby enabling the execution of arbitrary shell commands," Abbasi wrote.

Each of the five vulnerabilities are detailed below:

Needrestart is installed by default and was introduced in version 0.8 more than ten years ago. All versions of the utility before 3.8 are considered vulnerable and attackers could execute code as root. Versions after 3.8 have the fix applied.

Ubuntu Server is widely used, especially for running VMs, and although there are no exact figures that show how many instances are currently vulnerable, the number is likely to be in the millions.

The vulnerabilities, however, could be worse. The fact that an attacker would need local access to an Ubuntu Server instance means prospective attackers would need to go through the added hoops of gaining such access through the likes of remote access software, malware, or valid credentials.

"An attacker exploiting these vulnerabilities could gain root access, compromising system integrity and security," Abbasi added.

"This poses considerable risks for enterprises, including unauthorized access to sensitive data, malware installation, and disruption of business operations. It could lead to data breaches, regulatory non-compliance, and erosion of trust among customers and stakeholders, ultimately affecting the organization's reputation. Enterprises should swiftly mitigate this risk by updating the software or disabling the vulnerable feature."

Upgrading to version 3.8 or later of needrestart is the recommended course of action, although Qualys also said that users can modify needrestart's configuration to disable its interpreter heuristic, which mitigates the issue. ®

Send us news
15 Comments

UK ICO not happy with Google's plans to allow device fingerprinting

Also, Ascension notifies 5.6M victims, Krispy Kreme bandits come forward, LockBit 4.0 released, and more

Apache issues patches for critical Struts 2 RCE bug

More details released after devs allowed weeks to apply fixes

Three more vulns spotted in Ivanti CSA, all critical, one 10/10

Patch up, everyone – that admin portal is mighty attractive to your friendly cyberattacker

Fully patched Cleo products under renewed 'zero-day-ish' mass attack

Thousands of servers targeted while customers wait for patches

OpenWrt orders router firmware updates after supply chain attack scare

A couple of bugs lead to a potentially bad time

Infosec experts divided on AI's potential to assist red teams

Yes, LLMs can do the heavy lifting. But good luck getting one to give evidence

Perfect 10 directory traversal vuln hits SailPoint's IAM solution

20-year-old info disclosure class bug still pervades security software

Trump administration wants to go on cyber offensive against China

The US has never attacked Chinese critical infrastructure before, right?

Deloitte says cyberattack on Rhode Island benefits portal carries 'major security threat'

Personal and financial data probably stolen

Are your Prometheus servers and exporters secure? Probably not

Plus: Netscaler brute force barrage; BeyondTrust API key stolen; and more

Lights out for 18 more DDoS booters in pre-Christmas Operation PowerOFF push

Holiday cheer comes in the form of three arrests and 27 shuttered domains

US military grounds entire Osprey tiltrotor fleet over safety concerns

Boeing-Bell V-22 can't outfly its checkered past, it seems