Two New Vulnerabilities Could Affect 40% Of Ubuntu Cloud Workloads

Researchers at cloud security firm Wiz have discovered two easily exploitable privilege escalation vulnerabilities in Ubuntu’s OverlayFS module affecting 40% of Ubuntu cloud workloads.

OverlayFS is a union filesystem that allows one filesystem to overlay another, enabling file modifications without changing the base. It allows users to copy files from the base to the upper layer and perform operations and maintain metadata that should not be possible in Linux. 

The Wiz researchers discovered a flaw in the Ubuntu-specific OverlayFS module that allows specialized executables to escalate privileges to ‘root’ on the affected machine. It is possible to trick the Ubuntu Kernel into copying this file to a different location, giving anyone who executes it root-like privileges. Wiz found two vulnerabilities which, together, the firm describes as GameOver(lay).

The flaw is similar in operation to a Linux Kernel vulnerability (CVE-2021-3493) discovered in 2021. However, Ubuntu had earlier modified its own kernel in 2018 in a manner that allowed subsequent mitigations to the General kernel to not fully remove the basic flaw from Ubuntu’s OverlayFS module.

“Subtle changes in the Linux kernel introduced by Ubuntu many years ago have unforeseen implications,” explains Ami Luttwak, co-founder and CTO at Wiz. “We found two privilege escalation vulnerabilities caused by these changes and who knows how many other vulnerabilities are still lurking in the shadows of the Linux kernel spaghetti?”

The Wiz researchers discovered two vulnerabilities in the Ubuntu OverlayFS module: CVE-2023-2640 and CVE-2023-32629 (together dubbed ‘GameOver(lay)’).

CVE-2023-2640 is enabled because the Ubuntu OverlayFS module does not convert file security capabilities before files are copied. As a result, an unprivileged user can create a new directory structure and enter a new user namespace with administrative-like capabilities. They can then mount and OverlayFS mount, ultimately creating a file with capabilities applicable to the init user namespace and effectively escalating the user’s privileges to root. 

“Successful exploitation of CVE-2023-2640,” say the researchers, “therefore results in the generation of a ‘capable’ file in the `upperdir` directory that grants root-equivalent capabilities to anyone who executes it.”

Advertisement. Scroll to continue reading.

CVE-2023-32629 is similar to CVE-2023-2640, but affects slightly different kernel versions, and exploitation results from a different code flow. The result is the same: “The file has capabilities that are applicable to the init user namespace,” say the researchers, “which effectively escalates the user’s privileges to root.”

These are not the first vulnerabilities found within OverlayFS. Earlier examples include CVE-2016-1576, CVE-2021-3847, CVE-2021-3493, and CVE-2023-0386. The Wiz researchers note that CVE-2021-3493 is so similar to one of the GameOver(lay) vulnerabilities that “its publicly available PoC can currently be used to exploit that vulnerability as is.”

Ubuntu fixed the vulnerabilities on July 24, 2023, and users are urged to update their kernels.

New York-based Wiz was founded in January 2020 by Ami Luttwak (CTO), Assaf Rappaport (CEO), Roy Reznik (VP R&D), and Yinon Costica (VP of product). Its latest funding round (Series D, February 2023) raised $300 million, bringing the total raised to date to $900 million and valuing the company at $10 billion.

Related: Wiz Says 62% of AWS Environments Exposed to Zenbleed Exploitation

Related: Orca Sues Wiz Over Alleged Cloud Security Patent Violations

Related: CISA Tells Organizations to Patch Linux Kernel Vulnerability Exploited by Malware

Related: Canonical Patches Privilege Escalation Vulnerability in Ubuntu

READ MORE HERE