[Bug 241905] SSP setup is not thread-safe ?

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Nov 12 05:20:41 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241905

            Bug ID: 241905
           Summary: SSP setup is not thread-safe ?
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: misc
          Assignee: bugs at FreeBSD.org
          Reporter: kevans at freebsd.org

I think this is what it boils down to- qemu creates detached threads in
__constructor__ functions. When compiled statically with clang, maybe 40% of
the time I hit an SSP failure in one of these threads.

My current theory is that these threads spawn and race against __guard_setup. I
suspect that the SSP cookie is setup as the default, then later compared after
__guard_setup has run and the cookie has actually been initialized, then we get
a "failure" and qemu dies.

LLVM does a load from __stack_chk_guard, and that seems to just be a plain ol'
global, so the race seems plausible.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list