A stack overflow can be used to inject custom code that normally wouldn’t be allowed. If a computer instruction is structured to for instance send 8 bits to be stored in the memory stack, then run 8 bits of code, so like MMMMMMMMCCCCCCCC, if you have a stack overflow exploit it may let you for example send 16 bits into the memory part of the command, so it will fill up all the 8 Ms with memory write bits, but then continue to overflow bits from your memory string into the CCCCCCCC section afterwords, which would then be executed as a live software instruction, rather than a more inconsequential memory write.
Latest Answers