summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibC/ssp.cpp
AgeCommit message (Collapse)Author
2022-11-29LibELF: Add stack guard hardeningKeegan Saunders
Employ the same hardening that glibc and the Linux kernel use for generating stack guards: zero the first byte of the guard such that if C-style string functions read out of bounds on the stack, we do not overwrite or potentially leak the stack guard.
2022-11-29LibC: Use uintptr_t for __stack_chk_guardKeegan Saunders
We used size_t, which is a type that is guarenteed to be large enough to hold an array index, but uintptr_t is designed to be used to hold pointer values, which is the case of stack guards.
2022-11-01LibC: Properly implement stack protectorsTim Schumacher
The shared parts are now firmly compiled into LibC instead of being defined as a static library and then being copied over manually. The non-shared ("local") parts are kept as a static library that is linked into each binary on demand. This finally allows us to support linking with the -fstack-protector flag, which now replaces the `ssp` target being linked into each binary accidentally via CMake.
2021-10-17Everywhere: Make some symbols `__attribute__((used))` for LTODaniel Bertalan
With these changes, the userland builds correctly with Clang's ThinLTO enabled.
2021-07-17LibC: Use 64-bit stack smash value for 64-bit modePeter Bindels
Otherwise it'll use the first 32 bits that happen to come after, leading to very weird bugs. Fixes #8601
2021-07-03LibC: Don't use C++ attribute syntax in C-visible headersDaniel Bertalan
Fixes errors when building Clang's compiler-rt, which compiles in C11 more.
2021-04-22Everywhere: Use bgianf@serenityos.org for my copyright attributionBrian Gianforcaro
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-02-17LibC: Convert dbgprintf() => dbgln() in SSP handlerAndreas Kling
2021-01-12Libraries: Move to Userland/Libraries/Andreas Kling