Author: brooks Date: Mon Aug 10 18:26:18 2020 New Revision: 364087 URL: https://svnweb.freebsd.org/changeset/base/364087
Log: MFC r363966: Preserve ASLR vm_map flags across fork In the most common case (fork+execve) this doesn't matter, but further attempts to apply entropy would fail in (e.g.) a pre-fork server. Reported by: Alfredo Mazzinghi Reviewed by: kib, markj Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D25966 Modified: stable/12/sys/vm/vm_map.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/vm/vm_map.c ============================================================================== --- stable/12/sys/vm/vm_map.c Mon Aug 10 18:11:00 2020 (r364086) +++ stable/12/sys/vm/vm_map.c Mon Aug 10 18:26:18 2020 (r364087) @@ -3932,6 +3932,7 @@ vmspace_fork(struct vmspace *vm1, vm_ooffset_t *fork_c } new_map->anon_loc = old_map->anon_loc; + new_map->flags |= old_map->flags & (MAP_ASLR | MAP_ASLR_IGNSTART); old_entry = old_map->header.next; _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"