Hi, Frank
Sorry for the late reply. I just saw your post.
And I'm also planning to joining the contest, although my wife constantly complains about my nocturnal life style :-(
For the 5 attacks, you are right as the Attack #1, #2, and #5 can be easily thwarted by memory protection.
Although #3 can be stopped by using a separate buffer to store the return addresses, and copying the stored return address back during jal ra, xxx, it is hard to do so in hardware as the hardware has to be tied to the stack frame format (Please correct me if I'm wrong, as I might miss-read the paper). And such solution does not handle attack #4.
So here is what I have in mind for #3 and #4, as they are both indirect attacks:
1) identify the buffer copy operation
2) identify the indirect pointer manipulation, such as *(uint32_t *) (*(uint32_t *) target_addr) = ...
3) Flag the pointer in step (2)
4) If the pointer in step (3) is used as return address or function pointer, throw an exception.
Thanks!
Changyi