• Jinoh Kang's avatar
    loader: Don't return from __stack_chk_fail() stub in preloader. · da74da29
    Jinoh Kang authored
    GCC expects __stack_chk_fail() to be noreturn[1].  Returning from
    __stack_chk_fail() can thus lead to subtle failures.
    
    When crashing, use a volatile NULL pointer dereference.  Ideally we
    would like to "abort()" here, but doing so would require two more
    syscall definitions just for a cold function.  After all, the function
    isn't even used at all if -fno-stack-protector is specified.
    
    Also, don't say "stack smashing" (unlike glibc).  The preloader
    currently initializes the stack canary value to a fixed value (0), which
    serves little value in protecting against actual buffer overrun attacks.
    
    [1]: https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gccint/Stack-Smashing-Protection.html
    da74da29
Name
Last commit
Last update
dlls Loading commit data...
documentation Loading commit data...
fonts Loading commit data...
include Loading commit data...
libs Loading commit data...
loader Loading commit data...
nls Loading commit data...
po Loading commit data...
programs Loading commit data...
server Loading commit data...
tools Loading commit data...
.editorconfig Loading commit data...
.gitlab-ci.yml Loading commit data...
.mailmap Loading commit data...
ANNOUNCE Loading commit data...
AUTHORS Loading commit data...
COPYING.LIB Loading commit data...
LICENSE Loading commit data...
LICENSE.OLD Loading commit data...
MAINTAINERS Loading commit data...
README Loading commit data...
VERSION Loading commit data...
aclocal.m4 Loading commit data...
configure Loading commit data...
configure.ac Loading commit data...