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

Buffer Overflow / Stack Canary #4542

Closed
adontz opened this issue Feb 24, 2020 · 3 comments
Closed

Buffer Overflow / Stack Canary #4542

adontz opened this issue Feb 24, 2020 · 3 comments
Labels
question No questions on the issue tracker, please.
Milestone

Comments

@adontz
Copy link

adontz commented Feb 24, 2020

https://en.wikipedia.org/wiki/Buffer_overflow_protection#Canaries

Just curious what is the current status / future plans?

@Sobeston
Copy link
Contributor

I know LLVM has SafeStack. No idea if it's enabled.

@LemonBoy
Copy link
Contributor

We have stack probes on x86/x64 for both libc and stand-alone builds. Stack protection for libc-less targets is tracked in #276, enabling it requires a few lines of code and a decision on whether the TLS should always be allocated or not.

@andrewrk andrewrk added this to the 0.6.0 milestone Feb 29, 2020
@andrewrk andrewrk added the question No questions on the issue tracker, please. label Feb 29, 2020
@andrewrk
Copy link
Member

Stack overflow detection is enabled by default in safe build modes.

It's also planned for zig to have safe recursion (#1006) and in general to have a compile-time known stack upper bound (#157).

Parzival-3141 added a commit to Parzival-3141/Bare-Bones that referenced this issue Aug 15, 2023
Stack smash protection currently only works on targets with libc,
but stack overflow detection is enabled by default in safe build modes.
See ziglang/zig#4542.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question No questions on the issue tracker, please.
Projects
None yet
Development

No branches or pull requests

4 participants