Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stack canaries #19

Open
mchack-work opened this issue May 9, 2023 · 1 comment
Open

Stack canaries #19

mchack-work opened this issue May 9, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@mchack-work
Copy link
Member

Implement stack canaries to help against buffer overflows. lld gives:

ld.lld: error: undefined symbol: __stack_chk_guard

ld.lld: error: undefined symbol: __stack_chk_fail

which hints at what we need to implement.

@dehanj dehanj added the enhancement New feature or request label Sep 11, 2023
@dehanj dehanj transferred this issue from tillitis/tkey-ssh-agent Sep 11, 2023
@cobratbq
Copy link

cobratbq commented Feb 24, 2024

I was looking into the same functionality recently. embeddedartistry.com provides a comprehensive post on this topic. (Other than this post, I found mostly snippets of information.)
Given the lack of much runtime support, it seems that one must call function that performs the init manually, or include it right before call main in libcrt0/crt0.S.

Note that there is one minor consideration: if one includes the init-call in crt0.S, then main is no longer called with unmodified program memory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants