Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Mar 2020 01:55:28 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r359059 - in stable: 11/lib/libssp 12/lib/libssp
Message-ID:  <202003180155.02I1tSEt013002@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Wed Mar 18 01:55:27 2020
New Revision: 359059
URL: https://svnweb.freebsd.org/changeset/base/359059

Log:
  MFC r358993: libssp: don't compile with -fstack-protector*
  
  This similarly matches what we do in libc; compiling libssp with
  -fstack-protector* is actively harmful.  For instance, if the canary ctor
  ends up with a stack protector then it will trivially trigger a false
  positive as the canary's being initialized.
  
  This was noted by the reporter as irc/ircd-hybrid started crashing at start
  after our libssp was MFC'd to stable/11, as its build will explicitly link
  in libssp. On FreeBSD, this isn't necessary as SSP bits are included in
  libc, but it should absolutely not trigger runtime breakage -- it does mean
  that the canary will get initialized twice, but as this is happening early
  on in application startup it should just be redundant work.

Modified:
  stable/12/lib/libssp/Makefile
Directory Properties:
  stable/12/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/lib/libssp/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/12/lib/libssp/Makefile
==============================================================================
--- stable/12/lib/libssp/Makefile	Wed Mar 18 01:09:43 2020	(r359058)
+++ stable/12/lib/libssp/Makefile	Wed Mar 18 01:55:27 2020	(r359059)
@@ -17,4 +17,8 @@ SRCS=		stack_protector.c fortify_stubs.c
 
 CFLAGS.fortify_stubs.c=	-Wno-unused-parameter
 
+# Stack protection on libssp symbols should be considered harmful, as we may
+# be talking about, for example, the guard setup constructor.
+SSP_CFLAGS:=
+
 .include <bsd.lib.mk>



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