From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: Two issues with stack overflow protection Date: Wed, 29 Jul 2015 04:27:21 -0700 Message-ID: <55B8B899.8020508@dancol.org> References: <838ua0xkln.fsf@gnu.org> <55B85E43.6050306@cs.ucla.edu> <55B86E65.6030000@dancol.org> <55B87B84.4000105@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="xnUNI4Jeng3XxRLGlITNFVg4UQMGfndJp" X-Trace: ger.gmane.org 1438169268 32305 80.91.229.3 (29 Jul 2015 11:27:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 29 Jul 2015 11:27:48 +0000 (UTC) To: Paul Eggert , Eli Zaretskii , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 29 13:27:46 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZKPWT-0008DU-Qo for ged-emacs-devel@m.gmane.org; Wed, 29 Jul 2015 13:27:45 +0200 Original-Received: from localhost ([::1]:34651 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKPWS-0001Kc-Ly for ged-emacs-devel@m.gmane.org; Wed, 29 Jul 2015 07:27:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59145) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKPWE-0001KV-Mp for emacs-devel@gnu.org; Wed, 29 Jul 2015 07:27:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZKPWD-00082y-Lp for emacs-devel@gnu.org; Wed, 29 Jul 2015 07:27:30 -0400 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:45310) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKPWD-000811-DA; Wed, 29 Jul 2015 07:27:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:In-Reply-To:References:Subject:To:MIME-Version:From:Date:Message-ID; bh=1Y3c68fLYASkk3RvTU1ILK52AVqoKLBh/WsY629q2i8=; b=qsnhl0WylFA438kKjIlPIXkv8gKFp2ytEFfosjjHTa1mA1gwRPPTYoUR/3S1C80gqOguyb1WZdyFBOdxq8ximthvbw+Hzl2TWIPyR9c9cXoz+9yxNARf5C8B1pEyEawZkD/xURsqpgklhgbrvoodVEtaw4pclM0Rozn9AwxkcG0LF9pTz/J5tRIlqmJS8vkO4IEUhEi0HrHwTHsBC5Ss6egqpy5MpAFEX0zh72V6nVAGcat/YkuTe1Ge5zSwB4UiiLYLZDifKqbzrjj9uhsYyi+7CkX5bNsUGLVjV1vb8uVecGnvQ8aCdMt0fzO8Hve2OUdT86V+nl7QF0WzBRA4UQ==; Original-Received: from [2620:10d:c081:1101:2ab2:bdff:fe1c:db58] by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84) (envelope-from ) id 1ZKPWC-0004e2-1V; Wed, 29 Jul 2015 04:27:28 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 In-Reply-To: <55B87B84.4000105@cs.ucla.edu> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:188162 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --xnUNI4Jeng3XxRLGlITNFVg4UQMGfndJp Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 07/29/2015 12:06 AM, Paul Eggert wrote: > Daniel Colascione wrote: >> What's wrong with just mprotecting a guard page at the end of the stac= k, >> and on overflow, giving that region normal protection, unwinding as >> normal, then, at top level, restoring the guard page? >=20 > Unwinding can grow the stack. Sure. That's why you open up more stack to do the unwinding. Having done that, if you still overflow, just abort. At that point, you can't guarantee correct program semantics. --xnUNI4Jeng3XxRLGlITNFVg4UQMGfndJp Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJVuLiZAAoJEN4WImmbpWBlsJcQAJcXvHiU2OtE+u3wvTBAuuUw i7C1zDudhkYyckYSX22nSn9SqcRSQF1n7kjmkt6AJIApZcJGsDLRnrAeKtxYxI5j X26WJEz7x72akhHH/FqBMBsHOHPC8lgHUqQJqe9vMol6EFDQz6whgcYKY7K2dgPT hGyzJR27kZ2fJ7sSR15NroXUPlGpLob4YgXIhjtMA+eWc0hEYv/xP+0TugMt7I8Z qmdze5hIT1DfJzm5FuGEjWuh4my8KsNQCXv0RTjFefIzyImTQF6f+BL8oVa4vLnZ Dlrk2dSQOStLOQN7OOr5LoxoOeKTZDpIDoYsSf4PVVhzhGozzdHHZIs5NXeGxKF3 vY0mK1G/A1AL2AkOtS8OJo060mCk2HLgvlLaNDMKP5ltnnA6SvSueJdEcyBbySd8 h1BQNj/mi0KOeQFlb8kITt4Kbzn5nW+S1fMwzILbHglCpGR3p5HdBrIGGzBlhIeC blg6InxX1fRkBPxVmZ3qpiE6m5mbXAMAau4ROdguKbOCjgas0uBithpF1O52JH/K ShGblbup1XHgk6m5IiISqEFC0a4kdnmA3c4zRnGJsg1MJJtUiNGhDwgVbnfb39Bq /tUC3N296g43KFTbQqyt1auTAQEL1T76T8zqlAZ4Q/tv88VVvhPECtnnXPmHbA4H vATqgGx7ecAWSSxMer+e =GL1E -----END PGP SIGNATURE----- --xnUNI4Jeng3XxRLGlITNFVg4UQMGfndJp--