public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug dynamic-link/27111] New: pthread_create and tls access use link_map objects that may be concurrently freed by dlclose
@ 2020-12-24 14:39 nsz at gcc dot gnu.org
  2021-05-11 16:17 ` [Bug dynamic-link/27111] " cvs-commit at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: nsz at gcc dot gnu.org @ 2020-12-24 14:39 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=27111

            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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-05-11 16:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-24 14:39 [Bug dynamic-link/27111] New: pthread_create and tls access use link_map objects that may be concurrently freed by dlclose nsz at gcc dot gnu.org
2021-05-11 16:17 ` [Bug dynamic-link/27111] " cvs-commit at gcc dot gnu.org
2021-05-11 16:17 ` cvs-commit at gcc dot gnu.org
2021-05-11 16:26 ` nsz at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).