Mitigate CVE-2021-33909 Sequoia – Linux FS privilege escalation
A missing validation of a size_t-to-int conversion in the Linux kernel's seq_file interface allows an unprivileged local user to cause an out-of-bounds write. An attacker could escalate to root privileges or crash the system.
sysdig.com
Published on sysdig.com
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely a missing validation when a 64-bit buffer length is converted to a 32-bit signed integer, turning it negative and causing an out-of-bounds write in the seq_file interface.
Impact
An attacker with local low-level privileges could escalate to root and compromise the machine, but no public exploit for privilege escalation had been released at the time.
What the attacker needed
Local low-level access to the target machine
The fix
The vulnerability should be fixed by installing the related patch for your Linux distribution.
How it was found
- Create a deep directory structure whose total path length exceeds 1GB.
- Use a small eBPF program to cause information disclosure and a controlled out-of-bounds write.
- Locate the modprobe_path[] buffer in kernel memory and overwrite it to gain full privileges.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
This is a bug in the Linux kernel, the core of the operating system. A normal user on a machine can use a very long folder path to trick the kernel into writing data outside its intended memory area. That can let the user become the administrator (root) or crash the computer.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.