From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12418 Path: news.gmane.org!.POSTED!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: BUG: $ORIGIN does not seem to work Date: Sat, 27 Jan 2018 20:26:21 +0100 Message-ID: <20180127192621.GJ4418@port70.net> References: <17b31628-04b5-3181-4623-046ffc4c0cab@petroprogram.com> <20180126142137.GH4418@port70.net> <20180127110722.GI4418@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1517081103 7222 195.159.176.226 (27 Jan 2018 19:25:03 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 27 Jan 2018 19:25:03 +0000 (UTC) User-Agent: Mutt/1.9.1 (2017-09-22) Cc: musl@lists.openwall.com To: Stefan =?iso-8859-1?Q?Fr=F6berg?= Original-X-From: musl-return-12434-gllmg-musl=m.gmane.org@lists.openwall.com Sat Jan 27 20:24:58 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1efW5X-0008SB-8X for gllmg-musl@m.gmane.org; Sat, 27 Jan 2018 20:24:31 +0100 Original-Received: (qmail 32651 invoked by uid 550); 27 Jan 2018 19:26:33 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 32631 invoked from network); 27 Jan 2018 19:26:33 -0000 Mail-Followup-To: Stefan =?iso-8859-1?Q?Fr=F6berg?= , musl@lists.openwall.com Content-Disposition: inline In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:12418 Archived-At: * Stefan Fr=F6berg [2018-01-27 18:20:27 += 0200]: > Szabolcs Nagy kirjoitti 27.01.2018 klo 13:07: > > * Stefan Fr=F6berg [2018-01-27 01:50:= 21 +0200]: > >> My ldd is just symbolic link inside musl chroot environment, to > >> /lib/ld-musl-x86_64.so.1 > >> and it's symbolic link to /lib/libc.so > >> > >> Here is readelf output of that test program > >> readelf -d x > >> > >> Dynamic section at offset 0xe10 contains 24 entries: > >> =A0 Tag=A0=A0=A0=A0=A0=A0=A0 Type=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Name/Value > >> =A00x0000000000000001 (NEEDED)=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Sha= red library: [libcrypto.so.1.1] > > ^^^^^^^^^^^= ^^^^^ > > this looks like the wrong library version > > > > if you had straced the ldd output you would have seen > > that musl tries to open lib/libcrypto.so.1.1, but you > > probably only have lib/libcrypto.so.1.0.0 based on the > > glibc ldd output below. > No, that ldd was run inside, pure, chrooted musl environment. No glibc > inside. this does not matter > These are the only libcrypto* files inside that chroot environment: >=20 > =A0ls -lah /usr/lib/libcrypto.* > -rw-r--r--=A0=A0=A0 1 0=A0=A0=A0=A0=A0=A0=A0 0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0 5.0M Dec 17 00:24 /usr/lib/libcrypto.a > lrwxrwxrwx=A0=A0=A0 1 0=A0=A0=A0=A0=A0=A0=A0 0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0 16 Dec 17 00:24 > /usr/lib/libcrypto.so -> libcrypto.so.1.1 > -rwxr-xr-x=A0=A0=A0 1 0=A0=A0=A0=A0=A0=A0=A0 0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0 3.0M Jan 26 12:58 > /usr/lib/libcrypto.so.1.1 >=20 like i said, you linked the wrong library, try to link the right one. again, if you run the ldso under strace the problem will be obvious and we dont have to waste time. you should also strace ld to see what gets linked, if it's /usr/lib/libcrypto... then that's wrong. (instead of strace you can use -Wl,--trace)