From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6E8A03850432; Thu, 24 Dec 2020 14:39:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6E8A03850432 From: "nsz at gcc dot gnu.org" To: glibc-bugs@sourceware.org Subject: [Bug dynamic-link/27111] New: pthread_create and tls access use link_map objects that may be concurrently freed by dlclose Date: Thu, 24 Dec 2020 14:39:29 +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: 2.32 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: nsz at gcc dot gnu.org 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: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone 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 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: Thu, 24 Dec 2020 14:39:29 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D27111 Bug ID: 27111 Summary: pthread_create and tls access use link_map objects that may be concurrently freed by dlclose Product: glibc Version: 2.32 Status: NEW Severity: normal Priority: P2 Component: dynamic-link Assignee: unassigned at sourceware dot org Reporter: nsz at gcc dot gnu.org Target Milestone: --- concurrent pthread_create (or tls access) and dlclose are not safe now because pthread_create can dereference link_map pointers that may be freed. tls access has the same problem but there this is only used for an assertion check that is not strictly necessary so easy to fix. pthread_create really needs to look at the link_maps in case they have static tls that needs tls and dtv initialization at thread creation time. neither pthread_create nor tls access hold the dl_load_lock that would prevent this issue. --=20 You are receiving this mail because: You are on the CC list for the bug.=