An overflow occurs in the array on the stack. However, every ROP chain must must consist of only prime number.The key idea is Goldbach’s conjecture. Every even number (< 2^64) can be represented by the sum of two prime numbers.
The full write up is here:[https://eyebrowmoon.github.io/hacking/ctf/pctf/pctf_2018_write_up](https://eyebrowmoon.github.io/hacking/ctf/pctf/pctf_2018_write_up)