The Samba-Bugzilla – Attachment 15958 Details for
Bug 14372
smbd crashes when MacOS Catalina connects if iconv initialization fails.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for 4.12.next.
0001-s3-RPC-Don-t-crash-on-trying-to-talloc_free-1-if-smb.patch (text/plain), 2.19 KB, created by
Jeremy Allison
on 2020-05-07 19:04:42 UTC
(
hide
)
Description:
git-am fix for 4.12.next.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2020-05-07 19:04:42 UTC
Size:
2.19 KB
patch
obsolete
>From beaa33a2ea44bd8eb762b6d326f2f7462c6ff445 Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Wed, 6 May 2020 12:36:00 -0700 >Subject: [PATCH] s3: RPC: Don't crash on trying to talloc_free(-1) if > smb_iconv_open_ex() fails. >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Assign output from smb_iconv_open_ex() to a temporary >handle. Only assign to mds_ctx->[handles] if correctly >opened otherwise we end up trying to call smb_iconv_close(-1). > >MacOSX Catalina triggers this. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=14372 > >Signed-off-by: Jeremy Allison <jra@samba.org> >Reviewed-by: Ralph Boehme <slow@samba.org> > >Autobuild-User(master): Ralph Böhme <slow@samba.org> >Autobuild-Date(master): Thu May 7 18:03:16 UTC 2020 on sn-devel-184 > >(cherry picked from commit 14df5d20a8ec00bf8627732284f427f6463177e3) >--- > source3/rpc_server/mdssvc/mdssvc.c | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > >diff --git a/source3/rpc_server/mdssvc/mdssvc.c b/source3/rpc_server/mdssvc/mdssvc.c >index fce3335d602..d6edc1c1686 100644 >--- a/source3/rpc_server/mdssvc/mdssvc.c >+++ b/source3/rpc_server/mdssvc/mdssvc.c >@@ -1528,6 +1528,7 @@ struct mds_ctx *mds_init_ctx(TALLOC_CTX *mem_ctx, > struct mds_ctx *mds_ctx; > int backend; > bool ok; >+ smb_iconv_t iconv_hnd = (smb_iconv_t)-1; > > mds_ctx = talloc_zero(mem_ctx, struct mds_ctx); > if (mds_ctx == NULL) { >@@ -1566,21 +1567,23 @@ struct mds_ctx *mds_init_ctx(TALLOC_CTX *mem_ctx, > goto error; > } > >- mds_ctx->ic_nfc_to_nfd = smb_iconv_open_ex(mds_ctx, >+ iconv_hnd = smb_iconv_open_ex(mds_ctx, > "UTF8-NFD", > "UTF8-NFC", > false); >- if (mds_ctx->ic_nfc_to_nfd == (smb_iconv_t)-1) { >+ if (iconv_hnd == (smb_iconv_t)-1) { > goto error; > } >+ mds_ctx->ic_nfc_to_nfd = iconv_hnd; > >- mds_ctx->ic_nfd_to_nfc = smb_iconv_open_ex(mds_ctx, >+ iconv_hnd = smb_iconv_open_ex(mds_ctx, > "UTF8-NFC", > "UTF8-NFD", > false); >- if (mds_ctx->ic_nfd_to_nfc == (smb_iconv_t)-1) { >+ if (iconv_hnd == (smb_iconv_t)-1) { > goto error; > } >+ mds_ctx->ic_nfd_to_nfc = iconv_hnd; > > mds_ctx->sharename = talloc_strdup(mds_ctx, sharename); > if (mds_ctx->sharename == NULL) { >-- >2.20.1 >
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:
slow
:
review+
Actions:
View
Attachments on
bug 14372
: 15958