summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2016-05-26 17:23:39 +0000
committerderaadt <deraadt@openbsd.org>2016-05-26 17:23:39 +0000
commit0a2c9542a46bf95c44a7c089c7d762f04ec048ea (patch)
treeaf4ac8a9d8621a997b2f740805bbd787abfe7268
parentCopy ELF headers into guest VM memory (diff)
downloadwireguard-openbsd-0a2c9542a46bf95c44a7c089c7d762f04ec048ea.tar.xz
wireguard-openbsd-0a2c9542a46bf95c44a7c089c7d762f04ec048ea.zip
for textrels (sthen ran into one...):
Ignore the listed protection (which may contain X) when making page writeable temporary.
-rw-r--r--libexec/ld.so/i386/rtld_machine.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/ld.so/i386/rtld_machine.c b/libexec/ld.so/i386/rtld_machine.c
index e83173f7412..f827a120e59 100644
--- a/libexec/ld.so/i386/rtld_machine.c
+++ b/libexec/ld.so/i386/rtld_machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtld_machine.c,v 1.33 2016/05/22 01:40:57 deraadt Exp $ */
+/* $OpenBSD: rtld_machine.c,v 1.34 2016/05/26 17:23:39 deraadt Exp $ */
/*
* Copyright (c) 2002 Dale Rahn
@@ -200,7 +200,7 @@ _dl_md_reloc(elf_object_t *object, int rel, int relsz)
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);
}
}