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

Ransomware criminals love CISA's KEV list – and that's a bug, not a feature

1 in 3 entries are used to extort civilians, says new paper

Wallbleed vulnerability unearths secrets of China's Great Firewall 125 bytes at a time

Boffins poked around inside censorship engines – here's what they found

Critical flaws in Mongoose library expose MongoDB to data thieves, code execution

Bugs fixed, updating to the latest version is advisable

MITRE Caldera security suite scores perfect 10 for insecurity

Is a trivial remote-code execution hole in every version part of the training, or?

FreSSH bugs undiscovered for years threaten OpenSSH security

Exploit code now available for MitM and DoS attacks

Critical PostgreSQL bug tied to zero-day attack on US Treasury

High-complexity bug unearthed by infoseccers, as Rapid7 probes exploit further

Rather than add a backdoor, Apple decides to kill iCloud encryption for UK peeps

Plus: SEC launches new crypto crime unit; Phishing toolkit upgraded; and more

Harassment allegations against DEF CON veteran detailed in court filing

More than a dozen women came forward with accusations

Trump’s DoD CISO pick previously faced security clearance suspension

Hey, at least Katie Arrington brings a solid resume

Palo Alto firewalls under attack as miscreants chain flaws for root access

If you want to avoid urgent patches, stop exposing management consoles to the public internet

Does terrible code drive you mad? Wait until you see what it does to OpenAI's GPT-4o

Model was fine-tuned to write vulnerable software – then suggested enslaving humanity

Signal will withdraw from Sweden if encryption-busting laws take effect

Experts warned the UK’s recent 'victory' over Apple would kickstart something of a domino effect