
Data-only local privilege escalation exploit for Linux kernel io_uring CVE-2024-0582, using sprayed file structures and ext4_file_operations hooks to create a backdoor user.
A data-only attack based on CVE-2024-0582
The exploit follows the strategy in this blog post, except that I didn't use a child process to open files.
I found some exploits on GitHub follows the strategy in this write-up.
After I reproduced the exploit with socket-based control flow hijacking, I tried to implement the exploit with a data-only attack, which seems not open-sourced yet.
I fed the two write-ups above and https://github.com/ysanatomic/io_uring_LPE-CVE-2024-0582/blob/main/exploit.c into Claude and said:
Could you modify the code to fit in the data-only attack? It means open file instead of sock, seek ext4_file_operations instead of egg, delete the control flow hijack and modify the file permission.
This generated a code with a child process. But I think it's hard to debug if I use a child process. So I said:
Why not open file in the process, not using a child?
Then it generated almost the existing code.
Then I:
ext4_fops_offset.gcc exploit.c -o exploit -luring
./exploit
sudo cat /etc/passwd # If you can use sudo