Opened 4 years ago

Last modified 3 years ago

#62584 new defect

samba4: smbclient segmentation fault

Reported by: jsalort (Julien Salort) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: Cc:
Port: samba4

Description

I am running MacPorts 2.6.4 on macOS Catalina. samba4 @4.13.1_0 smbclient crashes with segmentation fault:

% smbclient -L PRAXIS
Enter WORKGROUP\jsalort's password: 
zsh: segmentation fault  smbclient -L PRAXIS

Attachments (1)

smbclient_2021-03-31-134635_Khitomer.crash (43.6 KB) - added by jsalort (Julien Salort) 4 years ago.
Crash log

Download all attachments as: .zip

Change History (7)

comment:1 Changed 4 years ago by jmroot (Joshua Root)

Summary: smbclient segmentation faultsamba4: smbclient segmentation fault

comment:2 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Attaching the crash log might be helpful.

Changed 4 years ago by jsalort (Julien Salort)

Crash log

comment:3 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

I recommend you search the samba bug tracker for any reports of this problem. And if you don't find one, file one. And provide the URL here so we can keep track of it.

Ordinarily I would suggest trying the latest version first, however I am unable to update our port to the latest version because it does not build, and I have filed bug reports about that: https://bugzilla.samba.org/show_bug.cgi?id=14680, https://bugzilla.samba.org/show_bug.cgi?id=14681

comment:4 Changed 3 years ago by 21stcaveman (Hamid Maadani)

Did some research, found this: https://bugzilla.redhat.com/show_bug.cgi?id=1892745

Updated the port to 4.14.7 (https://github.com/macports/macports-ports/pull/12057) in the hopes that latest stable version would have the fix. I still get the segfault though.

for me, it fails while starting 'GENSEC spengo' with gs_krb5. From debug output:

...
cli_session_creds_prepare_krb5: Successfully authenticated as xxx@yyy (xxx@yyy) to access yyy using Kerberos
cli_session_setup_spnego_send: Connect to yyy as xxx@yyy using SPNEGO
...
Starting GENSEC mechanism spnego
Starting GENSEC submechanism gse_krb5
Segmentation fault: 11

This could be fixed with turning off gse_krb5 and NTLMv2 in previous versions (https://stackoverflow.com/questions/52034903/smbclient-authentication-file-session-setup-failed-nt-status-invalid-paramet), but is enforced from version 4.13.0 (https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html#CLIENTUSESPNEGO).

Last edited 3 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:5 Changed 3 years ago by 21stcaveman (Hamid Maadani)

A downgrade to 4.12.15, combined with

    client NTLMv2 auth = no
    client use spnego = no

in smb.conf, did NOT fix the problem either. Fyi.

Last edited 3 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:6 Changed 3 years ago by 21stcaveman (Hamid Maadani)

tested newest RC version (4.15.0rc4), issue still persists.
Here is the Backtrace:

PANIC (pid 20652): Signal 11: Segmentation fault: 11 in 4.15.0rc4
BACKTRACE: 21 stack frames:
0   libsamba-util.0.dylib               0x00000001041bc4f2 log_stack_trace + 52
1   libsamba-util.0.dylib               0x00000001041bc5c1 smb_panic + 14
2   libsamba-util.0.dylib               0x00000001041bc7d8 BlockSignals + 0
3   libsamba-util.0.dylib               0x00000001041bc35b smb_panic_log + 0
4   libsystem_platform.dylib            0x00007fff205b4d7d _sigtramp + 29
5   ???                                 0x00000000000002b0 0x0 + 688
6   libgssapi-samba4.2.dylib            0x00000001048257dd gss_oid_equal + 50
7   libgssapi-samba4.2.dylib            0x0000000104823022 __gss_get_mechanism + 39
8   libgssapi-samba4.2.dylib            0x000000010482568f gss_init_sec_context + 326
9   libgse-samba4.dylib                 0x00000001040fc4c0 gensec_gse_update_send + 378
10  libgensec-samba4.dylib              0x00000001040b57d3 gensec_update_send + 263
11  libgensec-samba4.dylib              0x00000001040a7ce1 gensec_spnego_update_send + 1419
12  libgensec-samba4.dylib              0x00000001040b57d3 gensec_update_send + 263
13  liblibsmb-samba4.dylib              0x0000000103df09ff cli_session_setup_gensec_local_next + 94
14  liblibsmb-samba4.dylib              0x0000000103ded8b4 cli_session_setup_creds_send + 1528
15  liblibsmb-samba4.dylib              0x0000000103dee16a cli_session_setup_creds + 105
16  liblibsmb-samba4.dylib              0x0000000103e0cb68 do_connect + 382
17  liblibsmb-samba4.dylib              0x0000000103e0b6cc cli_cm_connect + 72
18  liblibsmb-samba4.dylib              0x0000000103e0b597 cli_cm_open + 123
19  smbclient                           0x00000001037dcce5 main + 3333
20  libdyld.dylib                       0x00007fff2058af5d start + 1

@ryandesign , can you please file a bug report with samba? my account has expired.

Last edited 3 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)
Note: See TracTickets for help on using tickets.