Skip to content

Canary checks can be misleading #49

@jduck

Description

@jduck

I ran into a particular scenario where checksec can provide a false sense of security. Let me try to explain.

  1. Custom code is written and compiled with -fstack-protector
  2. Said custom code is linked with a static library that is NOT compiled with -fstack-protector
  3. checksec is ran against the resulting binary and reports canaries are present

Unfortunately, the static library contains tons of functions that would benefit from stack canaries, but they simply are not present.

Perhaps it would make more sense to report some percentage of functions that contain canaries. However, some functions would not even get them based on compiler heuristics. So perhaps the best signal-to-noise is % of functions that should have them and do have them.

Looking forward to your thoughts...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions