|
Message-ID: <CAGt4E5sYcwr2mawhFVHdOYstBieTN45KRQ30S9suqxDbxjc37w@mail.gmail.com> Date: Tue, 2 Apr 2024 13:59:47 -0700 From: Markus Mayer <mmayer@...adcom.com> To: Musl Mailing List <musl@...ts.openwall.com> Cc: Colin Cross <ccross@...gle.com> Subject: Re: [PATCH 0/1] ldso: continue searching if wrong architecture is found On Wed, 7 Feb 2024 at 10:09, Colin Cross <ccross@...gle.com> wrote: > > On Tue, Feb 6, 2024 at 5:23 PM Markus Mayer <mmayer@...adcom.com> wrote: [...] > > The problem: > > > > If LD_LIBRARY_PATH is set to a directory containing 32-bit libraries and > > then a 64-bit binary is invoked, the shared library loader will pick up > > the 32-bit version of a library first, because it'll look at > > LD_LIBRARY_PATH before anything else. Mapping the 32-bit library into > > the 64-bit process will fail. This much is expected. > > > > However, even though the correct library resides on the system, the > > shared library loader never attempts to look for it. The 64-bit process > > will fail to launch, even though there is no reason for the failure. The > > problem only exists, because the shared library launcher doesn't look in > > the remaining shared library directories. > > [...] > > Continuing to search the system directories does seem to be the right > > thing to do under the circumstances described here. Also, it is what > > glibc does. [...] > > There is a previous discussion of the same issue at > https://www.openwall.com/lists/musl/2023/02/07/3. Thanks, Colin, for pointing this out. This was very helpful. We have been able to determine that Colin's patch series from February 2023 does address our issue. If I apply Colin's patches, the shared library loader will continue searching for a shared library match after unsuccessfully trying to load a 32-bit library into a 64-bit process. This behaviour is just what one would expect. Consequently, launching a 64-bit binary no longer fails just because the shared library loader happens to find the 32-bit version of a library it needs first. In light of this, does it make sense to revive Colin's series from last year and reconsider it for inclusion? If there is anything I can do to facilitate the process, please let me know. I can certainly help with testing. If Colin's series is somehow not acceptable, please let me know as well, and I will see what I can come up with to resolve the issue. Thanks, -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.