From nobody Wed Feb 16 17:59:16 2022 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 4B93419C9D8B; Wed, 16 Feb 2022 17:59: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 4JzQh50CrLz4kQ3; Wed, 16 Feb 2022 17:59:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645034357; 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=JZUnAj3XgGJ7y/+VXqtWQSKsypD4X7NS8odN7ynjIzo=; b=Mo7y0Y6FBtIxnghyQBEsoSf7EJqdtFRaHU2y3iWGwP1CsmpMXvrWAqqxs1TicHKvvbJK0Q 7nLeAJyyEq5+R+VQLFGoiTrv5NT2jYWkLxwTPvZaYxzUYWwNIr9z2W6iiQG/kURvGMXrpp 1DTDXEEUzlX/sgaoERQ0YYIchMlIBvZ5/MSjQiMAoAIA1ZnNjcPanMeYA3oT1rgKkGDvEz skJUCYGKc0OVA3MAFjFQt8Pht1ysyo/bYSGt67JP7M/b6y3exAvWWTqk9fshiav3QxBLgv KMrW5hf4AfQ3MBt5kAMmp3xBnx9TBb/xplaK1H1lF0Q3KjK3BXfcBNAsQSM58A== 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 A23A81A6FC; Wed, 16 Feb 2022 17:59:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 21GHxGvm050036; Wed, 16 Feb 2022 17:59:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21GHxGQS050035; Wed, 16 Feb 2022 17:59:16 GMT (envelope-from git) Date: Wed, 16 Feb 2022 17:59:16 GMT Message-Id: <202202161759.21GHxGQS050035@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: a097a58543dc - stable/13 - fork: Copy the vm_stacktop field into the new vmspace 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a097a58543dc86354f8979a276093e90000a4bbd Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645034357; 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=JZUnAj3XgGJ7y/+VXqtWQSKsypD4X7NS8odN7ynjIzo=; b=azrYzpefbjNQ6PQ3Q7/OF//ZxHYWRQ8eaFGnqznPx5kGt0195cv/Yyjr6FTPIcmWtiBS93 EDqubrNcLUB/uAsDsMCRXWAHGJI8JMKFv8adnj+aNRh932v72G7Agsjs54xhhrrXZjbG/9 FBaLwTBbwLRo3YLh4637MI3fE9UzxKf12jbjBuI7QfOsaDJMB9mC38iyOpBXdmI7SxGBG7 CNbBfcJAZWnfno2day6gPG51RrphLItzd5gFCQrgG68OAaedBANO4tYirbfWWTWkte69Mc Rywx/HpW2iAVPsrQINDwxX2NuIk0HXrrt2pjbo3ZFaD+kPGgBhJC/12yQW4B6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645034357; a=rsa-sha256; cv=none; b=uSknyn6EJ5okNjna7Pa0u0RnzYNA/+dIycXb4AlvErqa/Cw71vaFYkajRNOa6i1jANV5L4 6DH4QnCUJpp/nmdg2eAXAiM0iVhmO1bv3Zl7zHrgqhZsoLwC4ExQ8Ho9WdYM6iRXz6hQ+k YC4WrS5kvclBH5CFweKvBb1K846mQOk41zsfQcZi7RbmQtyyUDemWRiIIqTk+2pFS3Cj0O lTkcvkpTBJfkbqFRhybixtdwu03ffOveP8+nHrdklL1LD/tA+sR5zAmbNw2dRP1JImiyga BM9R+1aRHU+vojenIZVg1oNF5gKar5w7FzcR09yP4BokkFU8gwx9UEYozp5N9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a097a58543dc86354f8979a276093e90000a4bbd commit a097a58543dc86354f8979a276093e90000a4bbd Author: Mark Johnston AuthorDate: 2022-01-18 15:42:21 +0000 Commit: Mark Johnston CommitDate: 2022-02-16 16:55:11 +0000 fork: Copy the vm_stacktop field into the new vmspace Fixes: 1811c1e957ee ("exec: Reimplement stack address randomization") Reported by: pho Reported by: syzbot+0446312a51bc13ead834@syzkaller.appspotmail.com Sponsored by: The FreeBSD Foundation (cherry picked from commit 46d35d415aa9664b0ddc98a76e453eec20af0016) --- sys/vm/vm_map.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index cf2c96f9ab73..4c3448c358da 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -4265,6 +4265,7 @@ vmspace_fork(struct vmspace *vm1, vm_ooffset_t *fork_charge) vm2->vm_taddr = vm1->vm_taddr; vm2->vm_daddr = vm1->vm_daddr; vm2->vm_maxsaddr = vm1->vm_maxsaddr; + vm2->vm_stacktop = vm1->vm_stacktop; vm_map_lock(old_map); if (old_map->busy) vm_map_wait_busy(old_map);