From nobody Tue Jan 18 15:53:12 2022 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 B4C7919743AD; Tue, 18 Jan 2022 15:53:12 +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 4JdYG04WhXz3r7V; Tue, 18 Jan 2022 15:53:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642521192; 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=KA2kpsRxaeZmYaCpiRQJxo+SKwwRW5l4ADFLurhj00s=; b=g0Cqm/pAVdP5Pistf7r6R0XLt5sIpBGY7lBlcFv3yuq8OKBDWDlgAT2uhDTf7VsB5cZuSs m1Ybse06qEJ9G+Kobx/d2OXdVuLJU2/jzZrObAcPO+nzBQbDFfHUNQNq5UCr41AXeoDkjK JwuI3RGWrhBIUJYdthMKUPRZHLaQPqiv/2KreE+k4GDE/BEvscPtfCJyaTG4EBgn7Q0VOM DWAdn2RST84H+pr3+YQNanaTfck3+51iCwPmjNXigUGGUoy3AaMLrtp9xvuQTs0Rl9bBXp 4dShDncoR/U2VwGjIzMG+8UDTtdkpBxfx5hTYiWMBw3owPI8DqzvkMn3LJoDEg== 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 7C5C8241E1; Tue, 18 Jan 2022 15:53:12 +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 20IFrCvP003274; Tue, 18 Jan 2022 15:53:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20IFrCd8003273; Tue, 18 Jan 2022 15:53:12 GMT (envelope-from git) Date: Tue, 18 Jan 2022 15:53:12 GMT Message-Id: <202201181553.20IFrCd8003273@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 46d35d415aa9 - main - fork: Copy the vm_stacktop field into the new vmspace 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 46d35d415aa9664b0ddc98a76e453eec20af0016 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642521192; 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=KA2kpsRxaeZmYaCpiRQJxo+SKwwRW5l4ADFLurhj00s=; b=xvU0QffvLycoFIWFa4wTymwNrYXECZcfxUIEmrLSpYYf8Jt2aaWdN7ykpFxpsE4hQU4/D+ N63zD8xLm1bkQ3V1htFXaP4IIoq52Gr8fFRcHXUtwleWJwjFeIQasqW0BVcLfBKtAxcsKa Hi77yJPbGBYylEx/rmHx6kE3aXfQFKTmaburYCLRZsBx3ZD/xDZVhjv8zjZi+5Khgo8pKF XSnAixdvYYHucWi4aEbuWufnMa0UexlgRMj3myxTbZWT/rRKqVqePv+TBZwSf+N9MxGxj0 rZdBJZ3uaqvDsWiqbH2TEeHqY3ujWGkiWbyMoFiH+mjkXzxfS/ayn9tBJeW7ig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642521192; a=rsa-sha256; cv=none; b=UC6B2co8Uq73YxxrRtehN2iIbPMhhji1wGyla76/M56j6rFYU5Tgu6NT+NTuAM7aWMm5pe UAWegSJMzpsJR7VjJaJnxjyCt1n7TvOzGb7OeYcn74Q8azbI7hfGDsFQUalZly/8Q8WhMS VcQzigs3WmjadJO9AZmGh2zhMIJGAoaGCxLGVZR3Zl9arsNbgvlyJWovtBe9im8xtX4Vdi mh8Kz/qnk6fuMU6Sb+IOMWSXuTbQxgvKDTSSQ3sjb1dz5Mtm0bosKfh3aKH4rli8vttjan ueDi/8y1T9J+rn0ffqwpAw6ZgIKWbbIpZkr/EI+v0X+GzhmYOARIpvq0nWvAYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=46d35d415aa9664b0ddc98a76e453eec20af0016 commit 46d35d415aa9664b0ddc98a76e453eec20af0016 Author: Mark Johnston AuthorDate: 2022-01-18 15:42:21 +0000 Commit: Mark Johnston CommitDate: 2022-01-18 15:51:49 +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 --- 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 98d3d1e5bb1d..8d654f5ac612 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -4263,6 +4263,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);