From nobody Tue Oct 31 00:46:17 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 4SKBK531srz4ydHL; Tue, 31 Oct 2023 00:46:17 +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 4SKBK52Xprz4f3H; Tue, 31 Oct 2023 00:46:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698713177; 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=YsblnBclUzuuXSxrb3LTlRjihwavvM0O4vgk6lchjyA=; b=lqdmt6TQlqYHIvraGJqhUE2D44Bzn2Lyv+uMeZszPFLIldDe9bb/lz5lLElyA9sFELV3lF XtJET49FY+hzZ28fnmk7tjyoxH2Ec3k9bBEjl47hm25iz9p3/mOXw7OyRQTNgSHVSPDjLM 37jCN9E3lnHKpRr3wi1LtBuJMo4IZXx3RZ8PBmITLndZWTsfb/SDZdxjBcu22O58T1Z7e7 gYMbiefGkey7D3xEB/L8zn6Cke1LZ7emO0OYpqSAz4OBNMCF8z+UXVzHiCTrK60Q5/t0/O TpyyYltP2VVkn3F0kCW3n26ig7knJL3DNlknKv3h+nGgIMrY4JzIbArX2Zgobw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698713177; 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=YsblnBclUzuuXSxrb3LTlRjihwavvM0O4vgk6lchjyA=; b=gGSPG7b26qyvxo6NmkEcpJvYr3roOaVrQtkZbjIfrgv0ql1F+4DNyx83gQL98YyPydzzXk u3nwnfodC3XMl7KdrO33t5QtwKjTF844RCBohk9VDnrcEozKL10BWyF8H3Jo09U5FVKQGG X/p94ie73PxHIUzEvlvryRVkz4TTmW22xRAlLV8+VUD3Iz5Yo0SgpBxWmL9Z4yNy814EDf 20izXnmr3LlXFm0UJZJ4DBXWXza7htaDVVG0vKpSwjsbVToCSrwR7fV9y88iFVhm5ryO2v vG9Y0g/70ZmpkB3Btrp0igDhmTatItEfTkPTUGDgoIkCfmaiuze0LzspMIhzww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698713177; a=rsa-sha256; cv=none; b=Oj8ycPrK975fnLhlp5u8BQUAeZ8IM9vckcAxQMUGfdVWIAru9pDCfzPUtuvIEpyZRGfYpk YiwDIk+WnMc43uP03oKKP+GBvHOxNDgXabsRptMvPsguWgt1/TqSxITTBseWZHVr5Br85A hah3DAMUVOgExby6J0141vzgnd1zzlbgWUOE4YqR1p4D0H+x+0Re0A/vDVLJjVkDAj78iN Gq7dkSFyJpXrgPKzANRaQd4R/Lme/dQeqnvLt6fpGkKtVutl4YS6clFP7uZZ7grtjBUUFM VqYE/hZ8RERDZrGiLKxbPmABdXcCIQdha9HhcAxIdsHsobT1qakkd4w/xjS03Q== 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 4SKBK51brWzj4M; Tue, 31 Oct 2023 00:46:17 +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 39V0kHUg013172; Tue, 31 Oct 2023 00:46:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39V0kHnX013169; Tue, 31 Oct 2023 00:46:17 GMT (envelope-from git) Date: Tue, 31 Oct 2023 00:46:17 GMT Message-Id: <202310310046.39V0kHnX013169@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: 4b2694fbcf2a - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: 4b2694fbcf2a63e31ab33645d9291f3264eb06f6 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4b2694fbcf2a63e31ab33645d9291f3264eb06f6 commit 4b2694fbcf2a63e31ab33645d9291f3264eb06f6 Author: Konstantin Belousov AuthorDate: 2023-10-24 21:44:06 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-31 00:46:10 +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 e01bccc93cb0..4ebd08082545 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))