tl;dr: index magic to overwrite return address without corrupting the canary.
[dark mode writeup here](https://blackbeard666.github.io/pwn_exhibit/content/2020_CTF/DamCTF/pwn_allokay/pwn_allokay_writeup.html) (https://blackbeard666.github.io/pwn_exhibit/content/2020_CTF/DamCTF/pwn_allokay/pwn_allokay_writeup.html)