Bug 13505 - Threading support in talloc_tos() crashes when enabled
Summary: Threading support in talloc_tos() crashes when enabled
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
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!