Bug 13505 - Threading support in talloc_tos() crashes when enabled
Threading support in talloc_tos() crashes when enabled
Status: RESOLVED FIXED
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Other
unspecified
All All
: P5 normal
: ---
Assigned To: Karolin Seeger
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-07-04 11:24 UTC by Ralph Böhme
Modified: 2018-07-28 04:00 UTC (History)
1 user (show)

See Also:


Attachments
Patch for 4.7 and 4.8 cherry-picked from master (1.20 KB, patch)
2018-07-07 06:55 UTC, Ralph Böhme
jra: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Böhme 2018-07-04 11:24:07 UTC
talloc_stackframe_internal() calls SMB_THREAD_GET_TLS(global_ts) which calls smb_get_tls_pthread() in the POSIX pthread wrapper implementation.

If SMB_THREAD_SET_TLS() hasn't been called before, global_ts is NULL and smb_get_tls_pthread() dereferences it so it crashes.

Have patch, need bugnumber...
Comment 1 Ralph Böhme 2018-07-07 06:55:06 UTC
Created attachment 14308 [details]
Patch for 4.7 and 4.8 cherry-picked from master
Comment 2 Jeremy Allison 2018-07-09 20:03:03 UTC
Re-assigning to Karolin for inclusion in 4.8.next, 4.7.next.
Comment 3 Karolin Seeger 2018-07-12 11:07:55 UTC
(In reply to Jeremy Allison from comment #2)
Pushed to autobuild-v4-[8,7]-test.
Comment 4 Karolin Seeger 2018-07-28 04:00:19 UTC
Pushed to both branches.
Closing out bug report.

Thanks!