This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug dynamic-link/13862] Reuse of cached stack can cause bounds overrun of thread DTV


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

--- Comment #10 from David Abdurachmanov <david.abdurachmanov at gmail dot com> ---
Could not test master on RHEL 6 as it doesn't compile.

Not sure if I understood code correctly, but added

diff --git a/elf/dl-tls.c b/elf/dl-tls.c
index 824adc1..aa9f3c8 100644
--- a/elf/dl-tls.c
+++ b/elf/dl-tls.c
@@ -418,6 +418,11 @@ _dl_allocate_tls_init (void *result)
            {
              /* For dynamically loaded modules we simply store
                 the value indicating deferred allocation.  */
+             _dl_printf ("dtv[-1].counter: %u\n", dtv[-1].counter);
+             _dl_printf ("map->l_tls_modid: %u\n", map->l_tls_modid);
+             _dl_printf ("map->l_origin: %s\n", map->l_origin);
+             _dl_printf ("map->l_name: %s\n", map->l_name);
+             assert (map->l_tls_modid <= dtv[-1].counter);
              dtv[map->l_tls_modid].pointer.val = TLS_DTV_UNALLOCATED;
              dtv[map->l_tls_modid].pointer.is_static = false;
              continue;

dtv[-1].counter: 50
map->l_tls_modid: 51
map->l_origin:
/afs/cern.ch/cms/sw/ReleaseCandidates/vol1/slc6_amd64_gcc490/cms/cmssw-patch/CMSSW_7_2_X_2014-06-06-1400/external/slc6_amd64_gcc490/lib
map->l_name:
/afs/cern.ch/cms/sw/ReleaseCandidates/vol1/slc6_amd64_gcc490/cms/cmssw-patch/CMSSW_7_2_X_2014-06-06-1400/external/slc6_amd64_gcc490/lib/libsiscone_spherical.so.0
Inconsistency detected by ld.so: dl-tls.c: 425: _dl_allocate_tls_init:
Assertion `map->l_tls_modid <= dtv[-1].counter' failed!

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]