From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 09D95385DC10; Mon, 5 Jul 2021 14:50:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 09D95385DC10 From: "Simon.Richter at hogyros dot de" To: glibc-bugs@sourceware.org Subject: [Bug malloc/25533] dlopen with RTLD_DEEPBIND crashes when using custom memory manager Date: Mon, 05 Jul 2021 14:50:45 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: malloc X-Bugzilla-Version: 2.12 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: Simon.Richter at hogyros dot de X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: WONTFIX 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: 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: Mon, 05 Jul 2021 14:50:46 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D25533 --- Comment #7 from Simon Richter --- > This will only push the problem one layer further, in the sense that the = caller of strdup would have to be duplicated as well. In my case, the caller of the strdup is the object that was loaded with RTLD_DEEPBIND, so that would be kind of what I'd expect here: if another co= py of libudev already exists in the process and is reused without making sure = that its internal references aren't overridden in the instance that is returned, then the RTLD_DEEPBIND would be silently ignored. Rereading the documentation of RTLD_DEEPBIND, I'm even slightly confused why applying RTLD_DEEPBIND to an object will also pull the symbols of its dependencies to the front (so glibc's "realloc" wins over libtbbmalloc's, as libudev is only linked against glibc). I would have expected libudev's symb= ols to take precedence for internal resolution, and then the same order as in t= he rest of the program for the other symbols. --=20 You are receiving this mail because: You are on the CC list for the bug.=