[GH-ISSUE #971] ld.so.preload issue when running x32 apps on x64 host #658

Open
opened 2026-05-05 06:22:55 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @djfd on GitHub (Dec 12, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/971

Hi,

currently this simply does not work. E.g.

Child process initialized
ERROR: ld.so: object '/usr/lib/firejail/libconnect.so' from /etc/ld.so.preload cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
monitoring pid 3

Could you please change build script to produce required x32 libraries on x64 hosts and also add a piece of logic to startup routine to supply right libraries when starting x32 apps...

thanks

Originally created by @djfd on GitHub (Dec 12, 2016). Original GitHub issue: https://github.com/netblue30/firejail/issues/971 Hi, currently this simply does not work. E.g. ``` Child process initialized ERROR: ld.so: object '/usr/lib/firejail/libconnect.so' from /etc/ld.so.preload cannot be preloaded (wrong ELF class: ELFCLASS64): ignored. monitoring pid 3 ``` Could you please change build script to produce required x32 libraries on x64 hosts and also add a piece of logic to startup routine to supply right libraries when starting x32 apps... thanks
gitea-mirror added the
enhancement
label 2026-05-05 06:22:55 -06:00
Author
Owner

@netblue30 commented on GitHub (Dec 13, 2016):

You are right, currently the libraries are hardcocde to the original build (64bit in this case). I'll set is as an enhancement, thanks.

<!-- gh-comment-id:266740390 --> @netblue30 commented on GitHub (Dec 13, 2016): You are right, currently the libraries are hardcocde to the original build (64bit in this case). I'll set is as an enhancement, thanks.
Author
Owner

@djfd commented on GitHub (Dec 13, 2016):

that will not be easy, it seems... there are compiled apps, but also there are various shell scripts launchers and it is impossible to know what binaries they will load...

possible need to supply both x32 and x64 libraries in x64 environments...

<!-- gh-comment-id:266831693 --> @djfd commented on GitHub (Dec 13, 2016): that will not be easy, it seems... there are compiled apps, but also there are various shell scripts launchers and it is impossible to know what binaries they will load... possible need to supply both x32 and x64 libraries in x64 environments...
Author
Owner

@netblue30 commented on GitHub (Dec 14, 2016):

I'll try to see how far I can go on this one. Building the libraries is not such a problem. I don't know in this moment how to detect what library should be loaded. I am looking at Wine, it starts up as a 64bit executable and then it switches to 32bit.

<!-- gh-comment-id:267038815 --> @netblue30 commented on GitHub (Dec 14, 2016): I'll try to see how far I can go on this one. Building the libraries is not such a problem. I don't know in this moment how to detect what library should be loaded. I am looking at Wine, it starts up as a 64bit executable and then it switches to 32bit.
Author
Owner

@djfd commented on GitHub (Dec 14, 2016):

it seems the only way to supply both kinds simultaneously?

eg.one can run
firejail... --shell=none bash -c "xterm-x64 & ; untrusted-x32" ))) I am doing so to check what is going on ))

UPD or maybe to use some launch hooks, if there such kind of things in linux
UPD2 this stackexchang question looks very similar

<!-- gh-comment-id:267105169 --> @djfd commented on GitHub (Dec 14, 2016): it seems the only way to supply both kinds simultaneously? eg.one can run ```firejail... --shell=none bash -c "xterm-x64 & ; untrusted-x32"``` ))) I am doing so to check what is going on )) **UPD** or maybe to use some launch hooks, if there such kind of things in linux **UPD2** this [stackexchang question](http://unix.stackexchange.com/questions/155438/ld-so-preload-doesnt-differ-x86-32-and-x86-64) looks very similar
Author
Owner

@rusty-snake commented on GitHub (Jan 25, 2020):

still an issue?

<!-- gh-comment-id:578389825 --> @rusty-snake commented on GitHub (Jan 25, 2020): still an issue?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#658
No description provided.