summaryrefslogtreecommitdiff
path: root/source3/librpc
Commit message (Collapse)AuthorAgeFilesLines
* rpc: Remove named_pipe_auth_req_info6->need_idle_serverVolker Lendecke2023-05-161-1/+1
| | | | | | | | Involves bumping up the version number Bug: https://bugzilla.samba.org/show_bug.cgi?id=15361 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* rpcd: With npa->need_idle_server we can have more than 256 serversVolker Lendecke2023-03-061-1/+1
| | | | | | | | | | | | | | | Before this patch the worker-status cut the worker index such that samba-dcerpcd could not properly update status of the surplus rpc daemons. This could lead to those daemons to stay around forever, samba-dcerpcd will never notice they are idle and can exit. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15310 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Mar 6 22:35:00 UTC 2023 on atb-devel-224
* librpc: Fix compile error for libnet_join.idlChristof Schmitt2023-03-031-1/+8
| | | | | | | | | | | | | | | | | | | Fix this compile error: [753/756] Processing source3/librpc/idl/libnet_join.idl source3/librpc/idl/ads.idl:2:10: fatal error: config.h: No such file or directory #include "config.h" ^~~~~~~~~~ compilation terminated. source3/librpc/idl/libnet_join.idl:3: error: Failed to parse source3/librpc/idl/ads.idl source3/librpc/idl/libnet_join.idl:50: warning: [out] argument `account_name' not a pointer libnet_join.idl imports ads.idl which includes config.h. The build rule for ads.idl provides the include directory for config.h, so add a new rule to also specify that include directory for libnet_join.idl. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* smbd: Remove smbXsrv_open_global0->db_recVolker Lendecke2023-02-131-1/+0
| | | | | | | | | | The only user by now was net serverid wipedbs, and there it was easy to replace Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Mon Feb 13 10:49:43 UTC 2023 on atb-devel-224
* named_pipe_auth: Bump info5 to info6Joseph Sutton2023-02-081-1/+1
| | | | | | | | | In the next commit, we shall replace the 'authenticated' field of named_pipe_auth_req_info.info5.session_info.session_info.info with a more general 'user_flags' field. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* smbd: Remove smbXsrv_open->db_recVolker Lendecke2023-01-101-1/+0
| | | | | | | | This was only referenced in smbXsrv_open_close, but it was never assigned anything but NULL. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-librpc: use nbt_server_type in ads.idlGünther Deschner2022-12-162-2/+4
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-librpc: add ads.idl and convert ads_struct to talloc.Günther Deschner2022-12-165-4/+177
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:librpc: Improve GSE error messageAndreas Schneider2022-10-251-2/+19
| | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=15206 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Noel Power <noel.power@suse.com>
* s3:locking: introduce share_mode_data->not_storedStefan Metzmacher2022-09-201-1/+1
| | | | | | | | | | | | | | | | share_mode_data->fresh was very similar, but only set and never used. Now we remember 'not_stored' instead, the 'not_' is easier as ndr_pull sets [skip] elements to 0. We use this as indication to move the value to memcache. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15125 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:open_files.idl: add share_mode_entry_op_typeStefan Metzmacher2022-09-201-1/+10
| | | | | | | | | This makes it easier to read log files... BUG: https://bugzilla.samba.org/show_bug.cgi?id=15125 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbXsrv_client: notify a different node to drop a connection by client guid.Stefan Metzmacher2022-09-021-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If a client disconnected all its interfaces and reconnects when the come back, it will likely start from any ip address returned dns, which means it can try to connect to a different ctdb node. The old node may not have noticed the disconnect and still holds the client_guid based smbd. Up unil now the new node returned NT_STATUS_NOT_SUPPORTED to the SMB2 Negotiate request, as messaging_send_iov[_from]() will return -1/ENOSYS if a file descriptor os passed to a process on a different node. Now we tell the other node to teardown all client connections belonging to the client-guid. Note that this is not authenticated, but if an attacker can capture the client-guid, he can also inject TCP resets anyway, to get the same effect. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15159 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Sep 2 20:59:15 UTC 2022 on sn-devel-184
* lib/util: Change function to mem_equal_const_time()Joseph Sutton2022-06-091-2/+2
| | | | | | | | | | Since memcmp_const_time() doesn't act as an exact replacement for memcmp(), and its return value is only ever compared with zero, simplify it and emphasize the intention of checking equality by returning a bool instead. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* auth: Use constant-time memcmp when comparing sensitive buffersJoseph Sutton2022-06-091-2/+2
| | | | | | | | | This helps to avoid timing attacks. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15010 Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:rpc_server: Delete unused code and doc referencesVolker Lendecke2021-12-102-377/+0
| | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* idl: Define messages sent between samba-dcerpcd and rpcd'sVolker Lendecke2021-12-103-1/+84
| | | | | | | | | | | | | MSG_RPC_DUMP_STATUS will be like pool-usage carrying a file descriptor to report status to, the other two are described in rpc_host.idl. NOALIGN on rpc_worker_status: This makes it easier to count bytes to push into a static buffer. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* librpc: match gensec_gssapi and call gsskrb5_set_dns_canonicalize() for HeimdalAndrew Bartlett2021-12-091-6/+36
| | | | | | | | | | This is needed to ensure Heimdal does not attempt to use nss to canonicalize the name. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Dec 9 07:42:38 UTC 2021 on sn-devel-184
* s3:librpc: Improve calling of krb5_kt_end_seq_get()Pavel Filipenský2021-11-031-51/+59
| | | | | | | | | | | | Remove indentation with early return, best reviewed with git show -b Signed-off-by: Pavel Filipenský <pfilipen@redhat.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Nov 3 08:36:00 UTC 2021 on sn-devel-184
* s3-libnetapi: add NetRequestOfflineDomainJoin to IDLGünther Deschner2021-07-141-0/+15
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* s3-libnetapi: add NetProvisionComputerAccount() to IDLGünther Deschner2021-07-141-0/+23
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* s3-libnetapi: add offline domain join related error codes (not WERRORs)Günther Deschner2021-07-141-1/+12
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* s3-libnetapi: add missing NetJoinFlags for netapiGünther Deschner2021-07-141-0/+7
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* s3-libnet_join: add request_offline_join flagGünther Deschner2021-07-141-0/+1
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* s3-librpc: add ODJ_PROVISION_DATA pointer to libnet_JoinCtxGünther Deschner2021-07-142-2/+3
| | | | | | | | | | It will be used later to pass in offline domain join structs to serve request offline domain join requests. Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* s3-libnet_join: return account rid in libnet_JoinCtxGünther Deschner2021-07-141-1/+2
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* s3-libnet_join: let libnetjoin return a netr_DsRGetDCNameInfoGünther Deschner2021-07-141-2/+3
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* s3-libnet_join: add new provision_computer_account_only flagGünther Deschner2021-07-141-0/+1
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* idl: secrets_domain_info1_change is not a recursive structurePavel Filipenský2021-06-291-1/+1
| | | | | | | | | | | | | | 575d39048e3b4f619d65d65303ac809c40c5d495 has marked several structures as recursive, they contain typically a backpointer named '* next'. secrets_domain_info1 is not self recursive, it only contains a pointer named '*next_change'. Signed-off-by: Pavel Filipenský <pfilipen@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Jun 29 03:07:17 UTC 2021 on sn-devel-184
* gse_krb5: Provide keytab name in fill_mem_keytab_from_dedicated_keytab() ↵Andrew Bartlett2021-06-151-2/+5
| | | | | | | error strings. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* rpc: Give dcerpc_util.c its own headerVolker Lendecke2021-04-061-0/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbXsrv_open: intruduce smbXsrv_open_replay_cache to support FILE_NOT_AVAILABLEStefan Metzmacher2021-03-291-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before processing an open we need to reserve the replay cache entry in order to signal that we're still in progress. If a reserved record is already present we need to return FILE_NOT_AVAILABLE in order to let the client retry again. [MS-SMB2] contains this: <152> Section 3.2.5.1: For the following error codes, Windows-based clients will retry the operation up to three times and then retry the operation every 5 seconds until the count of milliseconds specified by Open.ResilientTimeout is exceeded: - STATUS_SERVER_UNAVAILABLE - STATUS_FILE_NOT_AVAILABLE - STATUS_SHARE_UNAVAILABLE This works fine for windows clients, but current windows servers seems to return ACCESS_DENIED instead of FILE_NOT_AVAILABLE. A Windows server doesn't do any replay detection on pending opens, which wait for a HANDLE lease to be broken (because of a SHARING_VIOLATION), at all. As this is not really documented for the server part of the current [MS-SMB2], I found the key hint in "SMB 2.2: Bigger. Faster. Scalier - (Parts 1 and 2)" on page 24. There's a picture showing that a replay gets FILE_NOT_AVAILABLE as long as the original request is still in progress. See: https://www.snia.org/educational-library/smb-22-bigger-faster-scalier-parts-1-and-2-2011 A Windows client is unhappy with the current windows server behavior if it such a situation happens. There's also a very strange interaction with oplock where the replay gets SHARING_VIOLATION after 35 seconds because it conflicts with the original open. I think it's good to follow the intial design from the 2011 presentation and make the clients happy by using FILE_NOT_AVAILABLE (and differ from Windows). I'll report that to dochelp@microsoft.com in order to get this hopefully fixed in their server too). BUG: https://bugzilla.samba.org/show_bug.cgi?id=14449 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* rpcclient: Let rpc_pipe_open_ncalrpc() figure out the dst sock itselfVolker Lendecke2021-03-191-11/+0
| | | | | | | | Let the epmapper take care of this, with "EPMAPPER" being the default socket that is connected for registration from ep_register() Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbd: make use of smb2_signing_key_{copy,sign_create,cipher_create}() helpersStefan Metzmacher2021-03-171-1/+5
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14512 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbXsrv_client: move the connection passing to ↵Stefan Metzmacher2021-03-061-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | smb2srv_client_mc_negprot_send/recv We need a full request/response pair in order to avoid races in the multichannel connection passing. smb2srv_client_mc_negprot_send/recv locks the db record for the given client_guid. If there's no entry found, we add ourself and return NT_STATUS_OK. If there's an existing process for that client guid we start messaging_filtered_read_send() dbwrap_watched_watch_send() before calling smb2srv_client_connection_pass(). Then we release the lock and wait for either MSG_SMBXSRV_CONNECTION_PASSED to arrive or retry if dbwrap_watched_watch_recv signaled a change in the database. If we got MSG_SMBXSRV_CONNECTION_PASSED we'll return NT_STATUS_MESSAGE_RETRIEVED in order to signal that the other process will take care of the connection and we terminate the current process. All that is done completely async, which means that the IDLE_CLOSED_TIMEOUT (60 seconds) may trigger deadtime_fn(), which will send itself a MSG_SHUTDOWN. So the process that accepted the tcp connection exists if there was no MSG_SMBXSRV_CONNECTION_PASSED within 60 seconds. However the fd may still exists in the kernel (and the new connection may still be handed to the other process. If that process somehow exists before there's no way to prevent a connection termination for the client. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14433 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Mar 6 03:30:06 UTC 2021 on sn-devel-184
* smbd: Remove "have_share_modes" from "struct share_mode_data"Volker Lendecke2020-12-041-1/+0
| | | | | | | | | | | Nobody in share_mode_lock.c looked at that value anymore, so we don't need to manually maintain it. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Dec 4 22:32:38 UTC 2020 on sn-devel-184
* librpc: talloc_stackframe() panics on failureVolker Lendecke2020-11-301-3/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* librpc: Make ep_register a bit easier to understandVolker Lendecke2020-11-301-1/+1
| | | | | | | I found the pointer dereference a bit confusing Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* librpc: Fix a talloc_stackframe() leakVolker Lendecke2020-11-301-1/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: safe_string: do not include string_wrappers.hMatthew DeVore2020-08-281-0/+1
| | | | | | | | | | | | | Rather than have safe_string.h #include string_wrappers.h, make users of string_wrappers.h include it explicitly. includes.h now no longer includes string_wrappers.h transitively. Still allow includes.h to #include safe_string.h for now so that as many modules as possible get the safety checks in it. Signed-off-by: Matthew DeVore <matvore@google.com> Reviewed-by: David Mulder <dmulder@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbd: stop accepting multichannel connections early in exit_server_common()Stefan Metzmacher2020-07-141-0/+1
| | | | | | | | | | | | | This is just a step in the correct direction, but there's still a possible race... BUG: https://bugzilla.samba.org/show_bug.cgi?id=14433 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Tue Jul 14 14:59:19 UTC 2020 on sn-devel-184
* s3:smbd: make sure we detect stale smbXsrv_connection pointers in ↵Stefan Metzmacher2020-07-081-0/+1
| | | | | | | | | | | | | | | | | | smbXsrv_session_auth0 Pointer values can be reused (yes, I hit that during my testing!). Introduce a channel_id to identify connections and also add some timestamps to make debugging easier. This makes smbXsrv_session_find_auth() much more robust. This is a similar change as 0cec96526bf4d3209caf36c4a19632ff5d5dd112: "smb2_server: make sure we detect stale smbXsrv_connection pointers in smbXsrv_channel_global" BUG: https://bugzilla.samba.org/show_bug.cgi?id=11898 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
* s3:smbd: add infrastructure to wait for TCP acksStefan Metzmacher2020-07-081-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will be the core of the logic that allows us to retry break notifications. When we start the "pending break cycle" we ask for the current retransmission timemout (rto) on the TCP connection and remember how many unacked bytes are in the kernel's send queue. Each time we send bytes into the kernel we add them to the unacked bytes. We use a timer using the rto interval in order to check the amount of unacked bytes again. The provides send_queu_entry.ack.req will be completed with tevent_req_done() when everything is completely acked, tevent_req_nterror(NT_STATUS_IO_TIMEOUT) when send_queu_entry.ack.timeout is expired or tevent_req_nterror(connection_error) when the connection gets disconnected. It works with support from the FreeBSD and Linux kernels. For other platforms we just have a fixed rto of 1 second. And pretend all bytes are acked when we recheck after 1 second. So only a connection error could trigger tevent_req_nterror(), but there's no timeout. A follow up commit will most likely disable support for multi-channel if we don't have kernel support. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11897 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
* s3:locking: convert share_mode_lock.c to generate_unique_u64()Stefan Metzmacher2020-07-081-1/+1
| | | | | | | | | | | | | | Instead of a sequence number that gets incremented we just need a value that's not reused. The is a similar change like the commit before at the g_lock.c layer. I expect a similar performance improvement here, but I don't know a specific benchmark test to check. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3:smbXsrv.idl: add lock_sequence_array to smbXsrv_open_global0Stefan Metzmacher2020-06-271-0/+1
| | | | | | | | | This is needed for lock replay detection. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Add net-ads-join dnshostname=fqdn optionIsaac Boukris2020-05-291-0/+1
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=14396 Signed-off-by: Isaac Boukris <iboukris@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri May 29 13:33:28 UTC 2020 on sn-devel-184
* smb2_server: make sure we detect stale smbXsrv_connection pointers in ↵Stefan Metzmacher2020-05-151-0/+3
| | | | | | | | | | | | | smbXsrv_channel_global Pointer values can be reused (yes, I hit that during my testing!). Introduce a channel_id to identify connections and also add some timestamps to make debugging easier. This makes smbXsrv_session_find_channel() much more robust. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3/librpc/crypto: Fix double free with unresolved credential cacheNoel Power2020-04-141-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We free gse_ctx->k5ctx but then free it again in the talloc dtor. This patch just lets the talloc dtor handle things and removes the extra krb5_free_context Failed to resolve credential cache 'DIR:/run/user/1000/krb5cc'! (No credentials cache found) ==30762== Invalid read of size 8 ==30762== at 0x108100F4: k5_os_free_context (in /usr/lib64/libkrb5.so.3.3) ==30762== by 0x107EA661: krb5_free_context (in /usr/lib64/libkrb5.so.3.3) ==30762== by 0x7945D2E: gse_context_destructor (gse.c:84) ==30762== by 0x645FB49: _tc_free_internal (talloc.c:1157) ==30762== by 0x645FEC5: _talloc_free_internal (talloc.c:1247) ==30762== by 0x646118D: _talloc_free (talloc.c:1789) ==30762== by 0x79462E4: gse_context_init (gse.c:241) ==30762== by 0x794636E: gse_init_client (gse.c:268) ==30762== by 0x7947602: gensec_gse_client_start (gse.c:786) ==30762== by 0xBC87A3A: gensec_start_mech (gensec_start.c:743) ==30762== by 0xBC87BC6: gensec_start_mech_by_ops (gensec_start.c:774) ==30762== by 0xBC8167F: gensec_spnego_client_negTokenInit_step (spnego.c:633) ==30762== Address 0x17259928 is 40 bytes inside a block of size 496 free'd ==30762== at 0x4C2F50B: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==30762== by 0x79462CA: gse_context_init (gse.c:238) ==30762== by 0x794636E: gse_init_client (gse.c:268) ==30762== by 0x7947602: gensec_gse_client_start (gse.c:786) ==30762== by 0xBC87A3A: gensec_start_mech (gensec_start.c:743) ==30762== by 0xBC87BC6: gensec_start_mech_by_ops (gensec_start.c:774) ==30762== by 0xBC8167F: gensec_spnego_client_negTokenInit_step (spnego.c:633) ==30762== by 0xBC813E2: gensec_spnego_client_negTokenInit_start (spnego.c:537) ==30762== by 0xBC84084: gensec_spnego_update_pre (spnego.c:1943) ==30762== by 0xBC83AE5: gensec_spnego_update_send (spnego.c:1741) ==30762== by 0xBC85622: gensec_update_send (gensec.c:449) ==30762== by 0x551BFD0: cli_session_setup_gensec_local_next (cliconnect.c:997) ==30762== Block was alloc'd at ==30762== at 0x4C306B5: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==30762== by 0x107EA7AE: krb5_init_context_profile (in /usr/lib64/libkrb5.so.3.3) ==30762== by 0xB853215: smb_krb5_init_context_common (krb5_samba.c:3597) ==30762== by 0x794615B: gse_context_init (gse.c:209) ==30762== by 0x794636E: gse_init_client (gse.c:268) ==30762== by 0x7947602: gensec_gse_client_start (gse.c:786) ==30762== by 0xBC87A3A: gensec_start_mech (gensec_start.c:743) ==30762== by 0xBC87BC6: gensec_start_mech_by_ops (gensec_start.c:774) ==30762== by 0xBC8167F: gensec_spnego_client_negTokenInit_step (spnego.c:633) ==30762== by 0xBC813E2: gensec_spnego_client_negTokenInit_start (spnego.c:537) ==30762== by 0xBC84084: gensec_spnego_update_pre (spnego.c:1943) ==30762== by 0xBC83AE5: gensec_spnego_update_send (spnego.c:1741) ==30762== BUG: https://bugzilla.samba.org/show_bug.cgi?id=14344 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Noel Power <npower@samba.org> Autobuild-Date(master): Tue Apr 14 22:55:51 UTC 2020 on sn-devel-184
* s3:rpc_server: Remove dead codeSamuel Cabrero2020-03-201-2/+0
| | | | | | | | Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Samuel Cabrero <scabrero@samba.org> Autobuild-Date(master): Fri Mar 20 17:11:28 UTC 2020 on sn-devel-184
* s3:rpc_server: Drop dcerpc_binding_vector usage in the server sideSamuel Cabrero2020-03-202-414/+69
| | | | | | | | | The endpoint mapper entry is built using the dcesrv_endpoint and the interfaces registered into it instead of using the dcerpc_binding_vector. Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* idl: limit recurion on recursive elementsGary Lockyer2020-02-272-2/+2
| | | | | | | | | | | | | | | | | Limit the max_recursion on self recursive definitions in the idl to 20,000. This value is hopefully large eneough to not impact normal operation, but small eneough to prevent stack over flow issues. Credit to OSS-Fuzz REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19820 BUG: https://bugzilla.samba.org/show_bug.cgi?id=14254 Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Feb 27 02:29:21 UTC 2020 on sn-devel-184