Two critical Linux vulnerabilities (CVE-2023-32629 and CVE-2023-2640) recently discovered in the Ubuntu kernel have exposed the potential for unprivileged local users to gain elevated privileges on a massive number of devices.
As one of the most widely used Linux distributions, with over 40 million users, Ubuntu faces a significant security challenge due to these flaws. The vulnerabilities stem from conflicting changes made to the OverlayFS module, an implementation targeted by threat actors in the past due to its unprivileged access via user namespaces and exploitable bugs.
Researchers from Wiz identified the issues, finding that CVE-2023-2640 is a high-severity vulnerability caused by inadequate permission checks, while CVE-2023-32629 is a medium-severity flaw in the Linux kernel memory management subsystem. The latter involves a race condition when accessing VMAs, leading to use-after-free and enabling an attacker to execute arbitrary code. The discrepancies in implementing OverlayFS on the Linux kernel, especially changes made by Ubuntu in 2018, paved the way for these vulnerabilities.
However, subsequent modifications to the module by the Linux kernel project in 2019 and 2022 caused conflicts that ultimately introduced the two flaws.
Wiz researchers warned that weaponized exploits for these Ubuntu-specific vulnerabilities have been publicly available for some time. While Ubuntu has released a security bulletin addressing the issues and other vulnerabilities in the latest version of its Linux kernel, the risk of exploitation remains imminent. Users are urged to promptly update their systems using the package manager, as the updates will take care of dependencies and configurations.
As only Ubuntu distributions and forks using custom modifications of the OverlayFS module are affected, other Linux distributions are considered safe from these specific vulnerabilities.