Open AntonioND opened 1 month ago
As I've said in https://github.com/blocksds/libnds/pull/98, now that we have stack protector support in libnds, we need a test for the stack protector (in examples/debug
).
We should also add this to the documentation, eventually, as well as the default exception handler.
There's a test in BlocksDS now, and a separate documentation issue is open: https://github.com/blocksds/sdk/issues/154
This leaves heap canaries.
Stack overflows in particular are very hard to detect and very dangerous, it would be very nice to have a system to create debug builds of a program that can detect this kind of issues.
The following can be used as inspiration: https://github.com/profi200/libn3ds/blob/3bd21685705cbcc4ada9aab2c0f43faeeb304151/source/arm11/debug.c#L309-L386
EDIT: We already have stack canaries thanks to @asiekierka, only heap canaries are left.