Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190812222638.GZ9017@brightrain.aerifal.cx>
Date: Mon, 12 Aug 2019 18:26:38 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: [PATCH] make relocation time symbol lookup and dlsym
 consistent

On Sun, Aug 11, 2019 at 01:18:11AM +0200, Szabolcs Nagy wrote:
> rebased the old patch.
> 
> changed a bit to avoid performance concerns.

> >From a57cd35acf26ba6202ed6534a57f496464f431a1 Mon Sep 17 00:00:00 2001
> From: Szabolcs Nagy <nsz@...t70.net>
> Date: Sat, 10 Aug 2019 23:14:40 +0000
> Subject: [PATCH] make relocation time symbol lookup and dlsym consistent
> 
> Using common code path for all symbol lookups fixes three dlsym issues:
> 
> - st_shndx of STT_TLS symbols were not checked and thus an undefined
>   tls symbol reference could be incorrectly treated as a definition
>   (the sysv hash lookup returns undefined symbols, gnu does not, so should
>   be rare in practice).
> 
> - symbol binding was not checked so a hidden symbol may be returned
>   (in principle STB_LOCAL symbols may appear in the dynamic symbol table
>   for hidden symbols, but linkers most likely don't produce it).
> 
> - mips specific behaviour was not applied (ARCH_SYM_REJECT_UND) so
>   undefined symbols may be returned on mips.
> 
> always_inline is used to avoid relocation performance regression, the
> code generation for find_sym should not be affected.
> ---
>  ldso/dynlink.c | 84 +++++++++++++++++++-------------------------------
>  1 file changed, 31 insertions(+), 53 deletions(-)

Thanks for rebasing this! Applying.

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.