The Samba-Bugzilla – Attachment 14308 Details for
Bug 13505
Threading support in talloc_tos() crashes when enabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for 4.7 and 4.8 cherry-picked from master
bug13505-v47,v48.patch (text/plain), 1.20 KB, created by
Ralph Böhme
on 2018-07-07 06:55:06 UTC
(
hide
)
Description:
Patch for 4.7 and 4.8 cherry-picked from master
Filename:
MIME Type:
Creator:
Ralph Böhme
Created:
2018-07-07 06:55:06 UTC
Size:
1.20 KB
patch
obsolete
>From b228406fc2a56681442a8aa9dbf60c1620bc7c85 Mon Sep 17 00:00:00 2001 >From: Ralph Boehme <slow@samba.org> >Date: Tue, 3 Jul 2018 15:30:33 +0200 >Subject: [PATCH] lib: smb_threads: fix access before init bug > >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. > >Bug: https://bugzilla.samba.org/show_bug.cgi?id=13505 > >Signed-off-by: Ralph Boehme <slow@samba.org> >Reviewed-by: Andreas Schneider <asn@samba.org> >(cherry picked from commit e311801e0e7171a2b50e39d3e0c2d2137f8b3d7e) >--- > lib/util/smb_threads.h | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/lib/util/smb_threads.h b/lib/util/smb_threads.h >index 9a096167743..67d05b8c411 100644 >--- a/lib/util/smb_threads.h >+++ b/lib/util/smb_threads.h >@@ -119,6 +119,9 @@ static int smb_set_tls_pthread(void *pkey, const void *pval, const char *locatio > \ > static void *smb_get_tls_pthread(void *pkey, const char *location) \ > { \ >+ if (pkey == NULL) { \ >+ return NULL; \ >+ } \ > return pthread_getspecific(*(pthread_key_t *)pkey); \ > } \ > \ >-- >2.13.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
jra
:
review+
Actions:
View
Attachments on
bug 13505
: 14308