Connect with us

Hi, what are you looking for?

SecurityWeekSecurityWeek

Vulnerabilities

19-Year-Old Linux Kernel Vulnerability Exposes Systems to Root Access

Proof-of-concept (PoC) exploit code has been released for the CIFSwitch flaw, which allows low-privileged users to escalate to root on vulnerable Linux systems.

Linux

A vulnerability that lurked in the Linux kernel for 19 years allows low-privileged users to obtain root-level privileges on numerous distributions.

Dubbed CIFSwitch, the issue impacts the Linux kernel’s CIFS subsystem and the cifs-utils userspace helper it uses for handling authentication. CIFS handles parts of the SMB network filesystem protocol, such as mounting shares, read/write actions, and SMB communication to the server.

When authenticating a mount, the subsystem sends a request_key call for a cifs.spnego key. The request checks the key in userspace and calls cifs.upcall as root to parse the key description, which contains fields such as UID, PID, credential cache, and namespace.

According to SpaceX security engineer Asim Viladi Oglu Manizada, the kernel does not check the origin of the request and the key description, which allows an attacker to call the request_key function directly and can supply their own key description fields, bypassing CIFS origin.

Because cifs.upcall is called as root, the helper switches into the namespaces of the PID supplied in the modified key description, providing the attacker with root access.

Furthermore, during the operation, before privileges are dropped, the helper also performs account lookup, which goes through Name Service Switch (NSS) and enables the loading of NSS modules.

Advertisement. Scroll to continue reading.

The attacker can abuse this by placing a fake NSS config file and an NSS module in their namespace, which results in the helper loading the attacker-controlled code as root, Manizada says.

According to the engineer, the vulnerability can be resolved by considering key descriptions as legitimate only when CIFS uses its private spnego_cred, and by implementing user-space hardening to check if the key description is indeed kernel-generated.

Certain Linux Mint, CentOS, Rocky Linux, Kali Linux, AlmaLinux, and SLES SAP distributions that have cifs-utils installed by default are vulnerable. According to the researcher, some distros are vulnerable only if cifs-utils was manually installed.

Many Ubuntu, Fedora, CentOS, Rocky Linux, AlmaLinux, Oracle Linux, openSUSE, and SLES distros block the execution path by default, while Amazon Linux 2 KVM and Kali Linux 2019.4/2020.4 are not affected.

Major Linux distributions rolled out fixes for the security defect earlier this month. Manizada has published proof-of-concept (PoC) code to help defenders “validate patches, mitigations, detections, and exposure”.

Related: PoC Released for DirtyDecrypt Linux Kernel Vulnerability

Related: New Linux Kernel Vulnerability Fragnesia Allows Root Privilege Escalation

Related: New ‘Dirty Frag’ Linux Vulnerability Possibly Exploited in Attacks

Related: Exploitation of ‘Copy Fail’ Linux Vulnerability Begins

Written By

Ionut Arghire is an international correspondent for SecurityWeek.

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing for the latest cybersecurity threats, trends, and expert insights.

Trending

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest threats, trends, and technology, along with insightful columns from industry experts.

Delve into big-picture strategies to reduce attack surfaces, improve patch management, conduct post-incident forensics, and tools and tricks needed in a modern organization.

Register

Organizations are investing heavily in third-party risk management, but breaches, delays, and blind spots continue to persist. Join this live webinar as we examine the gap between how organizations think their third-party risk programs are performing and what’s actually happening in practice.

Register

People on the Move

Anurag Jain has been appointed Senior Vice President of Engineering at CodeHunter

CTERA has appointed Tal Sarfaty as Senior Vice President of Cybersecurity.

Quantum Secure Encryption has named Michael Massing as Chief Technology Officer.

More People On The Move

Expert Insights

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest cybersecurity news, threats, and expert insights. Unsubscribe at any time.