From: deraadt Date: Sun, 6 Nov 2022 11:43:19 +0000 (+0000) Subject: ld.so wants to make it's own RELRO immutable, which is obviously done X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=980da63b6d9b0ec6f1ae2110e48e3e48717bd222;p=openbsd ld.so wants to make it's own RELRO immutable, which is obviously done right after it does mprotect PROT_READ. --- diff --git a/libexec/ld.so/loader.c b/libexec/ld.so/loader.c index 7d52d15ab0f..c23ea6d7ad1 100644 --- a/libexec/ld.so/loader.c +++ b/libexec/ld.so/loader.c @@ -1,4 +1,4 @@ -/* $OpenBSD: loader.c,v 1.198 2022/11/06 11:38:54 deraadt Exp $ */ +/* $OpenBSD: loader.c,v 1.199 2022/11/06 11:43:19 deraadt Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -436,6 +436,8 @@ _dl_self_relro(long loff) case PT_GNU_RELRO: _dl_mprotect((void *)(phdp->p_vaddr + loff), phdp->p_memsz, PROT_READ); + _dl_mimmutable((void *)(phdp->p_vaddr + loff), + phdp->p_memsz); break; } }