From owner-freebsd-stable@freebsd.org Mon Jul 17 23:17:45 2017 Return-Path: Delivered-To: freebsd-stable@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 9BD16DA3CC4 for ; Mon, 17 Jul 2017 23:17:45 +0000 (UTC) (envelope-from vlad-fbsd@acheronmedia.com) Received: from mx.irealone.hr (xoth.irealone.hr [136.243.79.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6292E76B2D for ; Mon, 17 Jul 2017 23:17:44 +0000 (UTC) (envelope-from vlad-fbsd@acheronmedia.com) Received: by mx.irealone.hr (Postfix, from userid 58) id DB2C779B6; Tue, 18 Jul 2017 01:17:39 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on postfix.xoth.irealone.hr X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 Received: from mail.irealone.com (unknown [10.0.0.10]) by mx.irealone.hr (Postfix) with ESMTP id A2D7C79AC for ; Tue, 18 Jul 2017 01:17:38 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 18 Jul 2017 01:17:38 +0200 From: "Vlad K." To: freebsd-stable@freebsd.org Subject: Re: stack_guard hardening bsdinstall option in STABLE and 11.1 Organization: Acheron Media In-Reply-To: <047E43D8-9F99-4855-8AAC-882AFBC891C9@dsl-only.net> References: <047E43D8-9F99-4855-8AAC-882AFBC891C9@dsl-only.net> Message-ID: X-Sender: vlad-fbsd@acheronmedia.com User-Agent: Roundcube Webmail/1.2.5 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jul 2017 23:17:45 -0000 On 2017-07-18 00:09, Mark Millard wrote: > (Although I expect Konstantin Belousov's note here is > the first public description of the problem's details.) Thanks for explaining the problem. I guess this was the reason why I failed to parse kib's reply, this was the first bit of info I encountered on that patch being effectively "broken" that way. > I agree that you did not get an answer for the other > part: > >> I simply asked if it's safe to assume the sysctl to be an integer in > >> 11.1 > > > I've not gone through any draft 11.1-release code to > check. It appears to be, the code is MFC'd with (if I'm correct) r320666. I've ran some tests in -RC3 and indeed it works, though probably for the reason you explained above (guard page eating into the stack), raising the stack_guard_pages sufficiently high (eg. 512 pages like the bsdinstaller in CURRENT defaults to) crashes threaded programs. If that is so, though, I wonder why it's not reverted, or at least the sysctl temporarily patched to remain boolean (or turned off completely). And the bsdinstaller option in CURRENT now essentially enables buggy and unstable behavior. If this is a known issue, why default to it in CURRENT. Anyway thanks for taking time to explain, this answers my questions. -- Vlad K.