Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Nov 2019 05:20:40 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 241905] SSP setup is not thread-safe ?
Message-ID:  <bug-241905-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D241905

            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@FreeBSD.org
          Reporter: kevans@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_setu=
p. I
suspect that the SSP cookie is setup as the default, then later compared af=
ter
__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.

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-241905-227>