I had an exam question on why security canaries should be short. I suspect that is so that the attacker has a harder time finding the canary. Is that right?

  • Why do you think it's harder to find (brute force?) a short canary? – domen Feb 17 at 11:50
  • I would think that you would want a security canary to be easy for an attacker to find, not hard. But then again maybe I am misunderstanding what you are talking about... – Conor Mancone Feb 17 at 13:28

Presumably you are referring to stack canaries, which is a runtime construct and trivial to find. You want them to be short for performance reasons as they are compared every time a function returns.

You can find some more information of the performance of protection here: https://research.google/pubs/pub43809/

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.