This is Max Kellermann's exploit POC for DirtyPipe, but modified to overwrite root's password field in /etc/passwd and restore after popping a shell.
Run ./compile.sh then ./exploit and it'll pop a root shell.
- If you get this error message, login as
rootwith the passwordaaron. - Then, restore
/etc/passwdby runningmv /tmp/passwd.bak /etc/passwd
(oops sorry my laptop battery is dying and my charger broke so I don't have time to fix this the right now, sorry)