From nobody Tue Oct 31 00:45:59 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SKBJl3pHxz4yd4M; Tue, 31 Oct 2023 00:45:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SKBJl3Fqmz4dqf; Tue, 31 Oct 2023 00:45:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698713159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9AWBbOl5ceyrygbSe+Lyf4/GoKyL5rc45KYjRBEc9gA=; b=tF51i5C8M0Se7Ld30tP0DGOCNmeXxD0n/laPGPdpVk3jWDX+B6JiJMSQNTYwXidvwXWfjO uYW/ExSnRZuSdSlXYCLQur5oQRM0a1jHHxtSGcFyMAk64zOvFe2arfWZ4cJvojhDExX6a/ BQbSIS2mG9I4yAW5pMiAllW6TYEAWEmSG8x6s/zlibI2dJcNBdWIah9W2+brUwoOtQ570r kZnQVtW/E9minoUkgrXHplW06mb4XDV+uKxY4inY2PkHpCgmqScnRhrYmHvhuDAdnya2fc HQ9qndM1uKv9I5jEQYive1ECZWE9EBI3m/OY9wvlKNSj8KmqwTHSSjtLtXwwZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698713159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9AWBbOl5ceyrygbSe+Lyf4/GoKyL5rc45KYjRBEc9gA=; b=CluMpGXVj1RFi3LZaqReSoM4VvP57+pkGnWd2mULeUBjAO9wNIqfSyCc0C/kgXcFPW/KAE cI1RMn4/k7L22ZWp6Kinm/lLi1i1rcorqS3QDV2tTyG8HzBfTiIgORo9vb+LSioJvWLOAd XYtDyCq9TpmsbuVM1VzdLdyOSFJHdE/dsM8GGySQQYr3CslGuCACZWp/IluX0T/776kDsV CotrW48EtfU5SVcwsBnbG/VSiCuhpEU6pz32dHLBr6QWqS5qt9zFQ6RscwEXDqOT+u03yL /Ab4xWUGlQ34s9ev/Bz1CVeRQ0hnmgKFGMt39TF/g8oqWi5N46XkkLDd7OXplw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698713159; a=rsa-sha256; cv=none; b=mGB85brNCPuk2dmmKh2AA+atQ2bFawttE/VC+FHMA2HLAIoJ1Xa9fRjRBcbBINdqYs50o4 45gtZutpvC4JZ+5ymqME/y/40wXfkG9Qzp+aHkbsdPwcvu1d+IpNMSf5819TeU0XQJLDVV t1YOutouP27zFOTyOSm7V3dAOgLLni4GpGRl5COcXChUdf/yQ3qEz9C+WW2hQP80/BomGn 7pAmqOo3MijrwwRWFMAsLENWrjuZRANsUpR1vyMGmLpeUhd8gZU2LEd6q3p7RKjW6KuKv2 Os1gVeqvlNZQo2cbgkh//pjMMH0jdOe9GByL9PQcuDLyFWEzbljC6q6Ze5LqUA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SKBJl2DzPzj4L; Tue, 31 Oct 2023 00:45:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39V0jxRH012983; Tue, 31 Oct 2023 00:45:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39V0jxg2012980; Tue, 31 Oct 2023 00:45:59 GMT (envelope-from git) Date: Tue, 31 Oct 2023 00:45:59 GMT Message-Id: <202310310045.39V0jxg2012980@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: b174bec464ba - stable/13 - user stack randomization: only enable by default for 64bit processes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b174bec464ba8a072502e647adc9c03bb2881f17 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b174bec464ba8a072502e647adc9c03bb2881f17 commit b174bec464ba8a072502e647adc9c03bb2881f17 Author: Konstantin Belousov AuthorDate: 2023-10-24 21:44:06 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-31 00:45:48 +0000 user stack randomization: only enable by default for 64bit processes (cherry picked from commit 1798b44fda382c473c9fc7762e162613a39dc23c) --- sys/kern/imgact_elf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 72273c2f32d9..6ab16e6cfb0c 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -200,7 +200,7 @@ SYSCTL_INT(ASLR_NODE_OID, OID_AUTO, honor_sbrk, CTLFLAG_RW, &__elfN(aslr_honor_sbrk), 0, __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE)) ": assume sbrk is used"); -static int __elfN(aslr_stack) = 1; +static int __elfN(aslr_stack) = __ELF_WORD_SIZE == 64; SYSCTL_INT(ASLR_NODE_OID, OID_AUTO, stack, CTLFLAG_RWTUN, &__elfN(aslr_stack), 0, __XSTRING(__CONCAT(ELF, __ELF_WORD_SIZE))