1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/source3/libsmb
Pavel Filipenský eb59d7c9b0 s3:libsmb: Fix panic in cliconnect.c
This command line panics:

$ bin/rpcclient ncacn_np: -c epmlookup

0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
1  0x00007ffff64ae8a3 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
2  0x00007ffff645c8ee in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
3  0x00007ffff64448ff in __GI_abort () at abort.c:79
4  0x00007ffff7b01524 in tevent_req_is_nterror (req=0x555555728610, status=0x7fffffff9bb4) at ../../lib/util/tevent_ntstatus.c:66
5  0x00007ffff7b9fd91 in cli_connect_nb_recv (req=0x555555728610, pcli=0x5555556fcb18) at ../../source3/libsmb/cliconnect.c:2731
6  0x00007ffff7ba02a8 in cli_start_connection_connected (subreq=0x555555728610) at ../../source3/libsmb/cliconnect.c:2882
7  0x00007ffff7aecb1a in _tevent_req_notify_callback (req=0x555555728610, location=0x7ffff7bde0e0 "../../source3/libsmb/cliconnect.c:2686") at ../../lib/tevent/tevent_req.c:177
8  0x00007ffff7aeccab in tevent_req_finish (req=0x555555728610, state=TEVENT_REQ_USER_ERROR, location=0x7ffff7bde0e0 "../../source3/libsmb/cliconnect.c:2686") at ../../lib/tevent/tevent_req.c:234
9  0x00007ffff7aecdda in tevent_req_trigger (ev=0x5555557182e0, im=0x555555728720, private_data=0x555555728610) at ../../lib/tevent/tevent_req.c:291
10 0x00007ffff7aeb513 in tevent_common_invoke_immediate_handler (im=0x555555728720, removed=0x0) at ../../lib/tevent/tevent_immediate.c:190
11 0x00007ffff7aeb685 in tevent_common_loop_immediate (ev=0x5555557182e0) at ../../lib/tevent/tevent_immediate.c:236
12 0x00007ffff7af7502 in epoll_event_loop_once (ev=0x5555557182e0, location=0x7ffff7af8ac0 "../../lib/tevent/tevent_req.c:342") at ../../lib/tevent/tevent_epoll.c:905
13 0x00007ffff7af2d22 in std_event_loop_once (ev=0x5555557182e0, location=0x7ffff7af8ac0 "../../lib/tevent/tevent_req.c:342") at ../../lib/tevent/tevent_standard.c:110
14 0x00007ffff7ae93ab in _tevent_loop_once (ev=0x5555557182e0, location=0x7ffff7af8ac0 "../../lib/tevent/tevent_req.c:342") at ../../lib/tevent/tevent.c:820
15 0x00007ffff7aecf9e in tevent_req_poll (req=0x555555728290, ev=0x5555557182e0) at ../../lib/tevent/tevent_req.c:342
16 0x00007ffff7b01647 in tevent_req_poll_ntstatus (req=0x555555728290, ev=0x5555557182e0, status=0x7fffffff9f4c) at ../../lib/util/tevent_ntstatus.c:109
17 0x00007ffff7ba246a in cli_full_connection_creds (output_cli=0x7fffffffa220, my_name=0x555555701990 "CLUSTEREDMEMBER", dest_host=0x0, dest_ss=0x0, port=0, service=0x5555556981d1 "IPC$", service_type=0x5555556981d6 "IPC", creds=0x5555556fa410, flags=4096) at ../../source3/libsmb/cliconnect.c:3807
18 0x0000555555619ae9 in main (argc=4, argv=0x7fffffffa3e8) at ../../source3/rpcclient/rpcclient.c:1308

tevent_req_is_nterror() expects error set by tevent_req_nterror()
- to have TEVENT_NTERROR_MAGIC, otherwise it calls abort().

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Pavel Filipensky <pfilipensky@samba.org>
Autobuild-Date(master): Mon Apr 15 14:55:21 UTC 2024 on atb-devel-224
2024-04-15 14:55:21 +00:00
..
ABI libsmbclient: Add smbc_[gs]etOptionPosixExtensions() 2023-10-12 16:55:34 +00:00
async_smb.c libcli: SMBntcreateX can return STOPPED_ON_SYMLINK 2023-11-01 18:55:32 +00:00
auth_generic.c
cli_smb2_fnum.c libsmb: remove mode from struct file_info 2023-10-31 04:38:42 +00:00
cli_smb2_fnum.h libsmb: infer posix context from info_level 2023-10-31 04:38:42 +00:00
cliconnect.c s3:libsmb: Fix panic in cliconnect.c 2024-04-15 14:55:21 +00:00
clidfs.c s3/libsmb: reuse smbXcli_conn_have_posix() 2023-10-26 15:29:29 +00:00
clidgram.c s3:libsmb/unexpected: pass nmbd_socket_dir from the callers of nb_packet_{server_create,reader_send}() 2024-04-05 12:24:41 +00:00
clidgram.h
clientgen.c s3:libsmb: Improve logging for failover scenarios 2023-10-18 14:43:37 +00:00
clierror.c libsmb: Fix whitespace and a typo 2024-01-23 23:28:31 +00:00
clifile.c libsmb: Simplify an if-condition 2024-03-12 13:31:31 +00:00
clifsinfo.c libsmb: Fix whitespace and a typo 2024-01-23 23:28:31 +00:00
clilist.c libsmb: infer posix context from info_level 2023-10-31 04:38:42 +00:00
climessage.c libsmb: Use tevent_req_nterror() properly 2023-08-22 16:45:31 +00:00
clioplock.c libsmb: Use tevent_req_oom() where appropriate 2023-08-22 16:45:31 +00:00
cliprint.c libsmb: Remove a call to SMBC_errno() 2023-09-25 19:01:34 +00:00
cliquota.c libsmb: Fix whitespace and a typo 2024-01-23 23:28:31 +00:00
clirap.c libsmb: Use cli_smb2_qpathinfo_send() for SMB_QUERY_FILE_ALT_NAME_INFO 2023-10-12 17:51:44 +00:00
clirap.h libsmb: Add placeholder "mode" parameter to cli_qpathinfo2() 2023-10-12 16:55:34 +00:00
clireadwrite.c libsmb: Remove "trans_oob()" macro 2021-11-11 19:08:37 +00:00
clisecdesc.c libsmb: Fix whitespace and a typo 2024-01-23 23:28:31 +00:00
clisymlink.c libsmb: Pass "flags" through cli_close_send() and pylibsmb 2023-10-10 08:19:29 +00:00
clitrans.c
conncache.c libsmb: Fix whitespace and a typo 2024-01-23 23:28:31 +00:00
dsgetdcname.c s3:libsmb/dsgetdcname: use NETLOGON_NT_VERSION_AVOID_NT4EMUL 2024-04-05 12:24:41 +00:00
dsgetdcname.h s3-dsgetdcname: add dsgetonedcname() 2021-07-14 16:49:30 +00:00
errormap_wbc.c libsmb: Fix whitespace and a typo 2024-01-23 23:28:31 +00:00
errormap_wbc.h
errormap.c libsmb: Fix whitespace and a typo 2024-01-23 23:28:31 +00:00
libsmb_cache.c libsmb: Make setting errno safer in SMBC_add_cached_server() 2023-04-18 14:58:36 +00:00
libsmb_compat.c libsmb: Slightly simplify smbc_init() 2023-04-18 14:58:36 +00:00
libsmb_context.c libsmbclient: Add smbc_[gs]etOptionPosixExtensions() 2023-10-12 16:55:34 +00:00
libsmb_dir.c libsmb: Remove a call to SMBC_errno() 2023-09-25 19:01:34 +00:00
libsmb_file.c libsmbclient: Read the file type from the server with posix enabled 2023-10-12 16:55:34 +00:00
libsmb_misc.c libsmb: Remove SMBC_errno() 2023-09-25 19:01:34 +00:00
libsmb_path.c s3:libsmb: Add missing parenthesis to logging message 2023-08-08 04:39:38 +00:00
libsmb_printjob.c libsmb: Remove a call to SMBC_errno() 2023-09-25 19:01:34 +00:00
libsmb_server.c libsmb: Pass neg contexts through sync smbXcli_negprot_recv() 2023-09-25 19:59:17 +00:00
libsmb_setget.c libsmbclient: Add smbc_[gs]etOptionPosixExtensions() 2023-10-12 16:55:34 +00:00
libsmb_stat.c libsmb: Expand IS_DOS_* macros 2023-10-10 23:23:40 +00:00
libsmb_thread_impl.c libsmb: Fix whitespace and a typo 2024-01-23 23:28:31 +00:00
libsmb_thread_posix.c libsmb: Fix whitespace and a typo 2024-01-23 23:28:31 +00:00
libsmb_xattr.c s3:libsmb_xattr: ace_compare() uses NUMERIC_CMP() 2024-04-10 23:58:12 +00:00
libsmb.h
namecache.c s3:libsmb: Fix code spelling 2023-07-13 06:34:01 +00:00
namequery_dc.c libsmb: Fix whitespace and a typo 2024-01-23 23:28:31 +00:00
namequery.c s3:libsmb:namequery: use NUMERIC_CMP in addr_compare 2024-04-10 22:56:33 +00:00
namequery.h
nmblib.c s3:libsmb/unexpected: pass nmbd_socket_dir from the callers of nb_packet_{server_create,reader_send}() 2024-04-05 12:24:41 +00:00
nmblib.h s3:libsmb/unexpected: pass nmbd_socket_dir from the callers of nb_packet_{server_create,reader_send}() 2024-04-05 12:24:41 +00:00
passchange.c libsmb: Pass neg contexts through sync smbXcli_negprot_recv() 2023-09-25 19:59:17 +00:00
proto.h libsmb: infer posix context from info_level 2023-10-31 04:38:42 +00:00
pylibsmb.c Use python.h from libreplace 2023-11-20 15:37:33 +00:00
samlogon_cache.c s3:winbind: Improve logging in samlogon_cache.c 2022-07-15 14:25:38 +00:00
samlogon_cache.h
smbclient.pc.in
smberr.c libsmb: Fix whitespace and a typo 2024-01-23 23:28:31 +00:00
smbsock_connect.c libsmb: Use tevent_req_nterror() properly 2023-08-22 16:45:31 +00:00
trusts_util.c s3:libsmb: Fix code spelling 2023-07-13 06:34:01 +00:00
unexpected.c s3:libsmb/unexpected: pass nmbd_socket_dir from the callers of nb_packet_{server_create,reader_send}() 2024-04-05 12:24:41 +00:00
unexpected.h s3:libsmb/unexpected: pass nmbd_socket_dir from the callers of nb_packet_{server_create,reader_send}() 2024-04-05 12:24:41 +00:00
wscript libsmbclient: Add smbc_[gs]etOptionPosixExtensions() 2023-10-12 16:55:34 +00:00