summaryrefslogtreecommitdiff
path: root/libexec/ld.so/alpha
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2016-06-21 15:25:39 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2016-06-21 15:25:39 +0000
commit4f908dbab81e31a5ed85d33cfc5f13efa43a042f (patch)
treec2120b73bc474bea02b95aa6027a5a7e6f3f9163 /libexec/ld.so/alpha
parent7e69dbfca45ff61a2865b4132a3ba615e1291693 (diff)
When handling DT_TEXTREL only set the mapping to READ+WRITE, ignore
possible EXEC permission for the section, because the proper permission is set late, and there are no thread concerns here. Avoids W^X issues in oddball cases. ok guenther kettenis
Diffstat (limited to 'libexec/ld.so/alpha')
-rw-r--r--libexec/ld.so/alpha/rtld_machine.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/ld.so/alpha/rtld_machine.c b/libexec/ld.so/alpha/rtld_machine.c
index b1fb74edb43..4a3fc307faf 100644
--- a/libexec/ld.so/alpha/rtld_machine.c
+++ b/libexec/ld.so/alpha/rtld_machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtld_machine.c,v 1.58 2016/03/20 02:29:51 guenther Exp $ */
+/* $OpenBSD: rtld_machine.c,v 1.59 2016/06/21 15:25:36 deraadt Exp $ */
/*
* Copyright (c) 1999 Dale Rahn
@@ -83,7 +83,7 @@ _dl_md_reloc(elf_object_t *object, int rel, int relasz)
for (llist = object->load_list; llist != NULL; llist = llist->next) {
if (!(llist->prot & PROT_WRITE)) {
_dl_mprotect(llist->start, llist->size,
- llist->prot|PROT_WRITE);
+ PROT_READ | PROT_WRITE);
}
}
}