From owner-freebsd-current@freebsd.org Wed Jul 27 22:55:31 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B732BA67EA for ; Wed, 27 Jul 2016 22:55:31 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qt0-x22f.google.com (mail-qt0-x22f.google.com [IPv6:2607:f8b0:400d:c0d::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 119761811 for ; Wed, 27 Jul 2016 22:55:31 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qt0-x22f.google.com with SMTP id w38so38916641qtb.0 for ; Wed, 27 Jul 2016 15:55:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=H/tpH6bV/IojT8ZWqKZHUIwGA0u0tymwUZXC5T07oBY=; b=Ypc6ByZ0kok4Kji6xUaHMH7TRLjS2RXIAfKG8SOv2h4JFPRy7LdAZapVicfvJV1ph8 9QGGBI5xW00Ysiu0f7HDHv+wA9lyvPxeqYLVyuE4SDF5AdLiTXdtfK8oSBXfMKouqBus L8n3ofaTCaDVhS5bCeH2O3nhnLAdVAng8vE1kbwh6ZdcuOnCKqvBQ53Pf8G68IJvjhJi QG7TpiYuENfEbZSN24mWev/WEK/97YzxZoy25xfwkLLJZG06fHSgg5jSCVm+o3PMUezt l/62CxlAu+10U2s9DIoDVAnvJSQ+zrkkxiajsV3nNqbmFZ/fePDEIBHH5cmDSWXfFZ/M Ohcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=H/tpH6bV/IojT8ZWqKZHUIwGA0u0tymwUZXC5T07oBY=; b=T9lcDq+e2gKQbVcSRyMDzhRQa9QTEUW5hihdwDipbIPndpQ492pVugU6XdUrr4/EAQ x6oOf7K9P9Iy9XHne72lRdREYzs3kZfxZ/UNCAmXOivkGjP7PLi8AX3SHH+AvbchdKA2 3ZKnvDMeW93+8rz1Q9CVEJWiYJoiu3w66AtLa9iw3xcdvT72YE2qMbOHXO5DkPFG+GY/ 7WfIzzAlUwozg7+BGCx6rBzHuT4Po4+mQyuxPxPjvQvHsB0DPsx+B/K2TQs5hbDRNRuL /MtiF4j+TvqURivgzJRDTV+HylkcjAYStqwOO20fuHGliuUTRHgzBY7/l7pIoxRCW7FH 82vg== X-Gm-Message-State: AEkoouti1iqGc7MSJDePcMYPqPLjJNKQbDTV5wI6cKInyjplhNDTBQ+0v/N3UuD9KaNFpzuWHUqBxFeQY1/CsOr/FnBZxsuHLocr3ho4LW4GSjTuaE8ggvJ3q6/TmjquBOCqHOIXzUNVmIzLQK6cFCQs9TcjYT4KJ3/HkPlAMH2xYUfUZT/dhJNAHoSSMSD49IfuJa3n X-Received: by 10.237.34.65 with SMTP id o1mr51225783qtc.78.1469660129768; Wed, 27 Jul 2016 15:55:29 -0700 (PDT) Received: from mutt-hardenedbsd (pool-100-16-217-171.bltmmd.fios.verizon.net. [100.16.217.171]) by smtp.gmail.com with ESMTPSA id j7sm5584620qkf.11.2016.07.27.15.55.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Jul 2016 15:55:28 -0700 (PDT) Date: Wed, 27 Jul 2016 18:55:27 -0400 From: Shawn Webb To: freebsd-current@freebsd.org Cc: emaste@freebsd.org Subject: SafeStack in base Message-ID: <20160727225527.GG13428@mutt-hardenedbsd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="GBDnBH7+ZvLx8QD4" Content-Disposition: inline X-Operating-System: FreeBSD mutt-hardenedbsd 12.0-CURRENT-HBSD FreeBSD 12.0-CURRENT-HBSD X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jul 2016 22:55:31 -0000 --GBDnBH7+ZvLx8QD4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hey All, I'm interested in getting SafeStack working in FreeBSD base. Below is a link to a simplistic (maybe too simplistic?) patch to enable SafeStack. The patch applies against HardenedBSD's hardened/current/master branch. Given how simple the patch is, it'd be extremely easy to port over to FreeBSD (just line numbers would change). I am running into a bit of a problem, though. When linking lib/libcom_err, I get the following error: com_err.So: In function `com_err': /usr/src/lib/libcom_err/../../contrib/com_err/com_err.c:100: undefined refe= rence to `__safestack_unsafe_stack_ptr' cc: error: linker command failed with exit code 1 (use -v to see invocation) *** [libcom_err.so.5.full] Error code 1 llvm's documentation says that SafeStack has been tested on FreeBSD. When and how was it tested? Apparently someone has done some work to enable it on FreeBSD, but I can't find any relevant FreeBSD-specific documentation. If someone could point me in the right direction, I'd love to help get SafeStack working (and commited?) in FreeBSD. Link to simplistic patch: http://ix.io/186A Link to build log: https://gist.github.com/lattera/5d94f44a5f3e10a28425cd59= 104dd169 Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --GBDnBH7+ZvLx8QD4 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJXmTveAAoJEGqEZY9SRW7uC9sQALS+PI7Wobe9LE35GarzqSt1 lYxTNeIR+UMi9Nb8db+HKMoHDXZPqmxAiyJgdOoUyP/EcyWzJQxzZ2JdSRlVZ+lR QX/+tPscF0Y+rMnu+vCuX5oJ3LGhwytfgQWDfW3NAbcVdQzSXkpCZG9fobOIXsOb ISW2x9/zTnnoMJuY7yyZHPhwjzC+ePwbJCYt0lPHYeQLN4d/g4g/mc1pPH6CHS/v EaqwItbor75DZaeUwk7xRJzcU/WuyPPxhlugtknhawqz1N2pDH6FTWX4pIpXeY+N vcyGQMDtXIeJiZxobOQolcYalOZqNyenDpRhfOGZ7RU0icq/9FEVd/AJW7OpPxNv Qw0D6h9VEwpEtvomwnE3eGmRebHcmXu3VPnUlDEaMvvJJO5MgtGhpYEXv0wg+TNr FLDoboUZqTMcr8LlX5F3hh7g/Ktvw3z9C7hVBnzIczwS1EoRaLhPw/Zie0X/JGEW HBQiGoCryILX2/XyUd4Tt4rR0trtEBIwyV/m+hTjQc4PWFHBOR4ItET7Aqlc7KC1 nND0jixU3jBuvZavpDpgYkupwALd8GyoGflj4CJdlQ2oW6TXohbsChvWX0QW3e5v U5L5sgx5yDFlTB/y/Pn8xPeBmb92eO+8f7mzUvKY494hEZ4YgIHzZc273KH0kyH1 9SiwJ6Wfg1uxnczbQFbI =PZla -----END PGP SIGNATURE----- --GBDnBH7+ZvLx8QD4--