Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZPnhasrLJYEGaUt5@voyager>
Date: Thu, 7 Sep 2023 16:42:50 +0200
From: Markus Wichmann <nullplan@....net>
To: musl@...ts.openwall.com
Cc: Peter Williams <peter@...ton.cx>
Subject: Re: aarch64 sigsetjmp relocation truncation bug, maybe

Am Thu, Sep 07, 2023 at 08:48:28AM -0400 schrieb Rich Felker:
> Are you sure this is the actual problem? I think it's that the aarch64
> (and several other archs) version of sigsetjmp is wrongly using the
> public setjmp symbol whose definition is possibly provided by a PLT
> thunk in the main program, rather than either setjmp@PLT (which would
> necessarily be the right local call point to use) or the hidden
> ___setjmp symbol that exists for this purpose (which i386, for
> example, uses).
>
> Rich

No I am not sure. I wrote that patch before heading to work, without
even test-compiling, and I don't know the first thing about arm64. But
every architecture I have ever looked into at any depth had a shorter
conditional branch than unconditional branch, and the linker normally
presumes to be able to rearrange input code sections at will, at least
for the branch length of an unconditional branch. Anything more usually
requires more specialized code and specialized options to the compiler.
That's why I wrote the patch in that way.

Of course you are right that I did not think about the PLT, or a
possible symbol interposition. However, the subroutine call to setjmp
that was already in sigsetjmp also didn't. And the prior version of the
code as well. So at least I didn't worsen the situation.

Ciao,
Markus

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.