From nobody Mon Mar 11 00:30:33 2024 X-Original-To: dev-commits-src-branches@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 4TtHk22RK7z5DDKq; Mon, 11 Mar 2024 00:30:34 +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 4TtHk20dF4z4trK; Mon, 11 Mar 2024 00:30:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710117034; 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=7szmvXepgFCAAH8siR16vCwlodAs8D/ifzKo+2PuvWw=; b=hBqa00GM6mJPbvxfWoXydQvUIo+QiFRc4oHT9QeI/EdBVTnz++QCFl6kM0cbRIuw4HnRMI /USRXfRlt3+vValnThry0tbHXEvUuEU2HrCUhWje92WUNcpG5RLBnufwjU4UvO0xlbqNle 6vtRiq+M0iXS/RjEXwHshmWjv7hfoJFoc1WEC/c8ei1/c68AsVC+DMq6WCFUKLniV+haPz kKPtDduJgk3SvhM3wNus4XCrLsRsrUpwJWZ+UHN1kVSmU9RG7dPplmNpk0J+4UOnAtqSne OIsFjULnG887sa6uBWkGn7WgG0To0sq1IjU6ZXJdekFuhCYs40E/lxIKGrFxEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710117034; a=rsa-sha256; cv=none; b=QyF4fehfzGJHUbyl/WlWf1VfczdBpaLlW3JFtknkqUsIa5vtBKOaLXVm+7BBU7iRx+/0Ol 5DLJ9V2b1QSLIGs4mPh3qPZvHGdRPL88d8lVwUgeYmqwiX/ZbaxLq7deFmuKbSPKgoBQWH +pyh72xeD3R8EzrMrQ6DvicOuNaBo/XJq3pZLL+EGnXHsrIe/jsOgqJDleFlk5zXHpTSGM XAe9yyxel8Z3lwn0gmbB1mg5Gsd2NlqKhryL/I6m95cssGvzyWTf/2dMAre+mJ6rornS67 A8/BHM7ZzU39DUP65qgNnyZmE1HvP/qSpaWqOCo0TTc5OrUWN4yriWoawH4Jtw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710117034; 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=7szmvXepgFCAAH8siR16vCwlodAs8D/ifzKo+2PuvWw=; b=Jmanddpk/7iTSn1D5MXcVSIdeGeTs1rEajq384IwI+Iyx4vujWciR3KNaT27X4uCs8MmIO ZVpBaPnvnwPi37IO4LdYOW3Zwb3q8IEiZb2yvebW2Ljt3uDH3qehc3onqorAzGFIMcnVdS tidI0xBoF3gt9AQYkTy8s5JHEW+ujt/4Ru9W+x+JTkljGplRJaGft7Ya4LlyNTFs64gDlH p2FqlcbxkRzjiEl2iHA//8cXfkUBHUzo/zyN4AzjMjZMoFCSAXhNj8EKTDU59JCSlXz4lK QH+rP+yWuDOuDyyX4LHDTZ5b9L8tCOoBztDO4YS9Ye9qFxlk1bpVuZ2xBXGmuQ== 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 4TtHk20DTsz16h2; Mon, 11 Mar 2024 00:30:34 +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 42B0UXHm003064; Mon, 11 Mar 2024 00:30:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42B0UXOe003062; Mon, 11 Mar 2024 00:30:33 GMT (envelope-from git) Date: Mon, 11 Mar 2024 00:30:33 GMT Message-Id: <202403110030.42B0UXOe003062@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: b52405d11db5 - stable/13 - posix_spawn(3): document POSIX_SPAWN_DISABLE_ASLR_NP List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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: b52405d11db5f959106f19568d4a8f94e951cee3 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b52405d11db5f959106f19568d4a8f94e951cee3 commit b52405d11db5f959106f19568d4a8f94e951cee3 Author: Konstantin Belousov AuthorDate: 2024-03-03 22:19:22 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-11 00:29:51 +0000 posix_spawn(3): document POSIX_SPAWN_DISABLE_ASLR_NP (cherry picked from commit a725a7a24de585e996f21e190b5af41261ebc774) --- lib/libc/gen/posix_spawn.3 | 12 +++++++++++- lib/libc/gen/posix_spawnattr_getflags.3 | 3 ++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lib/libc/gen/posix_spawn.3 b/lib/libc/gen/posix_spawn.3 index a9ff7b2b21da..55559ae7222b 100644 --- a/lib/libc/gen/posix_spawn.3 +++ b/lib/libc/gen/posix_spawn.3 @@ -32,7 +32,7 @@ .\" the referee document. The original Standard can be obtained online at .\" http://www.opengroup.org/unix/online.html. .\" -.Dd November 28, 2021 +.Dd March 4, 2024 .Dt POSIX_SPAWN 3 .Os .Sh NAME @@ -297,6 +297,15 @@ and the signals being indicated in the spawn-sigdefault attribute of the object referenced by .Fa attrp . .Pp +The Address Space Layout Randomization for the newly spawned process +can be disabled by specifying the +.Dv POSIX_SPAWN_DISABLE_ASLR_NP +flag in the spawn-flags attribute. +This setting is inherited by future children of the child as well. +See +.Xr procctl 2 +for more details. +.Pp If the value of the .Fa attrp pointer is NULL, then the default values are used. @@ -432,6 +441,7 @@ action. .Xr execve 2 , .Xr fcntl 2 , .Xr open 2 , +.Xr procctl 2 , .Xr sched_setparam 2 , .Xr sched_setscheduler 2 , .Xr setpgid 2 , diff --git a/lib/libc/gen/posix_spawnattr_getflags.3 b/lib/libc/gen/posix_spawnattr_getflags.3 index 18cf6683e935..308bbb386d76 100644 --- a/lib/libc/gen/posix_spawnattr_getflags.3 +++ b/lib/libc/gen/posix_spawnattr_getflags.3 @@ -32,7 +32,7 @@ .\" the referee document. The original Standard can be obtained online at .\" http://www.opengroup.org/unix/online.html. .\" -.Dd March 24, 2008 +.Dd March 4, 2024 .Dt POSIX_SPAWNATTR_GETFLAGS 3 .Os .Sh NAME @@ -75,6 +75,7 @@ It is the bitwise-inclusive OR of zero or more of the following flags .It Dv POSIX_SPAWN_SETSIGMASK .It Dv POSIX_SPAWN_SETSCHEDPARAM .It Dv POSIX_SPAWN_SETSCHEDULER +.It Dv POSIX_SPAWN_DISABLE_ASLR_NP .El .Pp These flags are defined in