Virtual Event: Zero Trust Strategies Summit - Watch all Sessions
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.

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.

AI tools connected to Google Workspace can access millions of sensitive emails and files. Join this session to uncover your organization’s risk and learn a framework to manage AI access.

Register

Join as we decipher the world of zero trust and share war stories on securing an organization by eliminating implicit trust and continuously validating every stage of a digital interaction.

Register

People on the Move

Randy Resnick has joined IGEL as Field CTO.

Darktrace has named Adam Towns as CFOO, Mike McGuinness as CRO, and Beth Shea as CCO.

Acronis has appointed Gerald Caron as CISO.

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.