Score:0

Is gcc's stack canary cryptographically secured? Does stack canary in general has to be cryptographically secured?

nz flag

I want to ask 2 questions:

  • Is GCC's stack canary cryptographically secured?
  • Does stack canary in general has to be cryptographically secured?
kelalaka avatar
in flag
Stack canary is about the protection of the programs from overlflow. While programming cryptography one may benefit this, this is not about fundamentals of cryptography, it is about software implementation of cryptography. I would not rather rely on a generic compiler to do a security related protection. In general, those are heavy crafted. It would be a matter of time some security researchers might exploit this kind of tricks or they cannot or they did not notice. Defcon has lots of examples.
Score:2
si flag

No. The stack canary has nothing to do with cryptography.

If you overrun the stack frame, your program has exhibited Undefined Behavior and all future execution is indeterminate. If you're lucky only the stack canary got overwritten, and the stack protector will still work when the function returns. In that case, your program will crash instead of continuing to execute indeterminate instructions. This cannot be relied upon, since a larger overrun could overwrite the return address and skip the stack protector code entirely.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.