diff options
author | Mark Johnston <markj@FreeBSD.org> | 2022-01-18 15:42:21 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2022-02-16 16:55:11 +0000 |
commit | a097a58543dc86354f8979a276093e90000a4bbd (patch) | |
tree | 88a6528d05b3933cbba7cc4ec6d78dcdb9a1c386 | |
parent | 5fa005e91560785dad5183db080209447afde3c2 (diff) | |
download | src-a097a58543dc86354f8979a276093e90000a4bbd.tar.gz src-a097a58543dc86354f8979a276093e90000a4bbd.zip |
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)
-rw-r--r-- | sys/vm/vm_map.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); |