From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E72093857C71; Tue, 4 Jul 2023 08:32:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E72093857C71 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1688459570; bh=YhGuJIjO7F3+oCX5ZfepgV9V+GnsGpaIcoOtfSk1OXk=; h=From:To:Subject:Date:From; b=QmsFdcxW8snF8i9DRsw0Y9iGXT+zwS4VZprYqKsSd9x21hxSdQZ6HgwCZp56uFSSp MA+MHDRYLKub6mzp3lJBYUu7eXDL3jvzryaSCTSKPX0DPiA0PLdr3X9UW/krdVRXDo JAic5g2ICUUyVtNcE+2HXWXqEwB/dpMI3iht2PJg= From: "fweimer at redhat dot com" To: glibc-bugs@sourceware.org Subject: [Bug dynamic-link/30613] New: Unexpanded $ORIGIN paths are stored on libname list if dlopen called with DST Date: Tue, 04 Jul 2023 08:32:44 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: dynamic-link X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: fweimer at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone flagtypes.name Message-ID: 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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30613 Bug ID: 30613 Summary: Unexpanded $ORIGIN paths are stored on libname list if dlopen called with DST Product: glibc Version: unspecified Status: NEW Severity: normal Priority: P2 Component: dynamic-link Assignee: unassigned at sourceware dot org Reporter: fweimer at redhat dot com Target Milestone: --- Flags: security- This seems to happen if $ORIGIN substitutions are used in dlopen. This is either a harmless waste of memory (because the unexpanded paths are never u= sed for lookup), or a correctness issue (because the $ORIGIN paths depend on the caller of dlopen). Here's a dump of the libname aliases from the elf/tst-global1 test case: namespace 0 '' 0x7ffff7ffe2d0 origin 0x7ffff7ffe8a0 "/home/fweimer/src/gnu/glibc/build-master/elf" alias '' 'linux-vdso.so.1' 0x7ffff7ffe930 alias 'linux-vdso.so.1' './libc.so.6' 0x7ffff7fbc480 origin 0x7ffff7fbc950 "/home/fweimer/src/gnu/glibc/build-master/." alias 'libc.so.6' '/home/fweimer/src/gnu/glibc/build-master/elf/ld-linux-x86-64.so.2' 0x7ffff7ffdab0 <_rtld_local+2736> alias '/lib64/ld-linux-x86-64.so.2' alias 'ld-linux-x86-64.so.2' '/home/fweimer/src/gnu/glibc/build-master/elf/testobj6.so' 0x7ffff7fff2f0 origin 0x7ffff7fff7d0 "/home/fweimer/src/gnu/glibc/build-master/elf" alias '$ORIGIN/testobj6.so' '/home/fweimer/src/gnu/glibc/build-master/elf/testobj1.so' 0x7ffff7fff870 origin 0x7ffff7fffd80 "/home/fweimer/src/gnu/glibc/build-master/elf" alias '/home/fweimer/src/gnu/glibc/build-master/elf/testobj1.so' '/home/fweimer/src/gnu/glibc/build-master/elf/testobj2.so' 0x7ffff7fffe20 origin 0x7ffff8000330 "/home/fweimer/src/gnu/glibc/build-master/elf" alias '/home/fweimer/src/gnu/glibc/build-master/elf/testobj2.so' alias '$ORIGIN/testobj2.so' --=20 You are receiving this mail because: You are on the CC list for the bug.=