A critical vulnerability known as StackRot (CVE-2023-3269) has been identified, affecting various versions of the Linux kernel. Discovered by security researcher Ruihan Li, this flaw resides in the kernel’s memory management subsystem and can be exploited with minimal capabilities to compromise the system and elevate privileges.
A patch has been released for affected stable kernels, and further details, along with a complete exploit code, are expected to be disclosed later this month. StackRot, arising from the Linux kernel’s stack expansion handling within its memory management subsystem, stems from the introduction of the “maple tree” data structure system in Linux kernel version 6.1.
This new system, relying on the read-copy-update (RCU) mechanism, replaces the previous “red-black trees.” The vulnerability manifests as a use-after-free (UAF) problem, resulting from the way stack expansion is managed. Exploiting this flaw can lead to an exploitable context for privilege escalation.
Although StackRot is a complex vulnerability, researcher Ruihan Li plans to reveal complete technical details and provide a proof-of-concept (PoC) exploit by the end of July.
The fix for this issue was merged into Linus Torvalds’ tree during the Linux kernel 5.5 merge window on June 28th and was subsequently backported to stable kernels (6.1.37, 6.3.11, and 6.4.1), effectively resolving the bug on July 1st. Linux users are advised to check the kernel version running on their systems and opt for a release that is not affected by StackRot or one that includes the necessary fix.
It’s important to note that not all major Linux distributions have adopted the affected version (Linux kernel 6.1) yet, such as Ubuntu 22.04.2 LTS (Jammy Jellyfish), which ships with Linux kernel version 5.19. Keeping systems updated with secure kernel releases is crucial to mitigating the risks associated with the StackRot vulnerability.