From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1424 Path: news.gmane.org!not-for-mail From: orc Newsgroups: gmane.linux.lib.musl.general Subject: Re: noexecstack Date: Mon, 6 Aug 2012 14:45:21 +0800 Message-ID: <20120806144521.565b32cc@sibserver.ru> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1344235646 14599 80.91.229.3 (6 Aug 2012 06:47:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 6 Aug 2012 06:47:26 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1425-gllmg-musl=m.gmane.org@lists.openwall.com Mon Aug 06 08:47:25 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1SyH64-00078K-Td for gllmg-musl@plane.gmane.org; Mon, 06 Aug 2012 08:47:25 +0200 Original-Received: (qmail 28231 invoked by uid 550); 6 Aug 2012 06:47:23 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 28184 invoked from network); 6 Aug 2012 06:47:19 -0000 In-Reply-To: X-Mailer: claws-mail Xref: news.gmane.org gmane.linux.lib.musl.general:1424 Archived-At: On Sun, 5 Aug 2012 23:35:36 +0200 Daniel Cegie=C5=82ka wrote: > Vasily Kulikov published a patch for nonexecutable stack for glibc in > Owl. >=20 > http://openwall.com/lists/owl-dev/2012/08/05/1 > http://openwall.com/lists/owl-dev/2012/08/05/3 >=20 > Should we support this in the musl? >=20 > The patch for musl asm files is attached... >=20 > best regards, > Daniel Correct me if I'm wrong, but this is ugly stuff. - binutils ld has -z noexecstack command line option. - this (GNU_STACK) is binutils-specific (tinycc, for example, does not generate ELFs with that section, and future direction should be on that plain ELFs without any gnuish extensions IMO) - Kernel sets executable stack by default, kernel can be patched not to do that (that's one line patch per architecture) - binutils can be patched to not produce ELFs with executable stack by default While some of options I listed here may harm some GCC or binutils internals (I don't know), I see an utility that comes with grsecurity patches (paxctl) that operates that section (GNU_STACK), converting it into it's own. I tested a system with patched binutils and kernel (but binutils patch here will be enough) without any problems.