From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DB5363858416; Fri, 22 Oct 2021 11:39:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DB5363858416 From: "Houdek.Ryan@fex-emu.org" To: glibc-bugs@sourceware.org Subject: [Bug libc/28487] Static application fault with dlopen library in rtld_malloc stubs Date: Fri, 22 Oct 2021 11:39:25 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.33 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: Houdek.Ryan@fex-emu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Oct 2021 11:39:26 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28487 --- Comment #2 from Ryan Houdek --- This application can't be fully dynamic because it needs to support binfmt_misc. This application will be used in cross-arch chroot environments and runtime executable dynamic loader executable environment at the same time. In the cross-arch chroot environment, dynamic libraries (likely, more on th= at in a moment) won't be used. We don't want, and in some edge cases, can't provide the host architecture's libraries to be available inside of the chroot. binfmt_misc will load the interpreter for each process in this instance. We can't provide the host architecture's libraries in these cases since the distributions involved may not support multiarch. In the case of the application being used outside of the cross-arch chroot. Then the binfmt_misc application will still be picked up for the other architecture's executables (Think 32-bit x86 being executed on AArch64). At some point in the application's code path, we will need to load libGL, b= ut we can't know that up front. Then in the worst case, we will be in a cross-arch chroot environment, we w= ill have binded the host architecture's libraries in to the cross-arch chroot. We will then end up dynamically loading libraries or not depending on a bun= ch of tooling being run. Since binfmt_misc is something that needs to be setup by a root user, we ca= n't really do much about changing the binary depending on namespace. Doesn't re= ally matter since in some cases you can't ever preempt what will happen. If dlopen from static-pie executables is removed then it is very much going= to break behaviour here. It wasn't noticed before but it is now since some of = the scope is expanding. --=20 You are receiving this mail because: You are on the CC list for the bug.=