Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 31 Mar 2021 10:33:31 -0400
From: Rich Felker <dalias@...c.org>
To: Alexander Monakov <amonakov@...ras.ru>
Cc: musl@...ts.openwall.com
Subject: Re: RELRO vs deferred binding

On Wed, Mar 31, 2021 at 05:27:09PM +0300, Alexander Monakov wrote:
> Hi,
> 
> my understanding is that deferred binding currently does not work if any of the
> deferred relocations fall into the RELRO segment.
> 
> I am raising this because Alpine may try enabling -fno-plt globally, and
> with -fno-plt non-PLT GOT relocations will be in RELRO, and affected Xorg
> modules will fail to load, again, but now with a segfault in the dynamic
> linker, presumably (I have not tested this).

Thanks for raising this. I think deferred binding needs to be updated
either to ignore RELRO if there are outstanding relocations (possibly
deferring it until they are all resolved) or to unprotect and
reprotect on every incremental link. (This could be optimized out and
preserve some further safety by scanning the outstanding relocation
table and skipping the unprotect/reprotect if none of them lie in the
RELRO range.)

Rich

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.