Bringing Stack Clash Protection to Clang / X86 — the Open Source Way

Context Stack clash is an attack that dates back to 2017, when the Qualys Research Team released an advisory with a joint blog post. It basically exploits large stack allocation (greater than PAGE_SIZE) that can lead to stack read/write not triggering the stack guard page allocated by the Linux Kernel.