vmspace_fork: preserve wx settings in the child vm map after fork
Noted by: markj Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
ff1a307801
commit
9402bb44f1
@ -4303,7 +4303,8 @@ vmspace_fork(struct vmspace *vm1, vm_ooffset_t *fork_charge)
|
||||
}
|
||||
|
||||
new_map->anon_loc = old_map->anon_loc;
|
||||
new_map->flags |= old_map->flags & (MAP_ASLR | MAP_ASLR_IGNSTART);
|
||||
new_map->flags |= old_map->flags & (MAP_ASLR | MAP_ASLR_IGNSTART |
|
||||
MAP_WXORX);
|
||||
|
||||
VM_MAP_ENTRY_FOREACH(old_entry, old_map) {
|
||||
if ((old_entry->eflags & MAP_ENTRY_IS_SUB_MAP) != 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user