From f05359a061749af21cd37456b3627e704b5afe02 Mon Sep 17 00:00:00 2001 From: Tobias Neitzel Date: Sun, 24 Sep 2023 21:52:01 +0200 Subject: [PATCH] Fix security callback enumeration for 32bit From RpcCore2, the _RPC_INTERFACE_T structure layout seems to be incorrect regarding the security callback. The changes in this commit were confirmed to fix the issue for RpcCore4 and probably also work for the previous two versions. --- RpcCore/RpcCore2_32bits/RpcInternals.h | 4 ++-- RpcCore/RpcCore3_32bits/RpcInternals.h | 6 +++--- RpcCore/RpcCore4_32bits/RpcInternals.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/RpcCore/RpcCore2_32bits/RpcInternals.h b/RpcCore/RpcCore2_32bits/RpcInternals.h index 1b7996a..22ea0cc 100644 --- a/RpcCore/RpcCore2_32bits/RpcInternals.h +++ b/RpcCore/RpcCore2_32bits/RpcInternals.h @@ -81,7 +81,7 @@ typedef struct _RPC_INTERFACE_T ULONG Flags; ULONG EpMapperFlags; RPC_MGR_EPV PTR_T pMgrEpv; - RPC_IF_CALLBACK_FN PTR_T IfSecurityCallbackFn; + RPC_IF_CALLBACK_FN PTR_T IfCallbackFn; RPC_SERVER_INTERFACE_T RpcServerInterface; ULONG unk2[2]; BOOL bInterfaceSupportMultipleTransferSyntaxes; @@ -91,7 +91,7 @@ typedef struct _RPC_INTERFACE_T UUID_VECTOR PTR_T pUuidVector; SIMPLE_DICT_T RpcInterfaceManagerDict; UCHAR Annotation[MAX_RPC_INTERFACE_ANNOTATION]; - RPC_IF_CALLBACK_FN PTR_T IfCallbackFn; + RPC_IF_CALLBACK_FN PTR_T IfSecurityCallbackFn; ULONG CurrentNullManagerCalls; ULONG CurrentAutoListenCalls; ULONG __Field_DC; diff --git a/RpcCore/RpcCore3_32bits/RpcInternals.h b/RpcCore/RpcCore3_32bits/RpcInternals.h index 196ad1a..9561f0a 100644 --- a/RpcCore/RpcCore3_32bits/RpcInternals.h +++ b/RpcCore/RpcCore3_32bits/RpcInternals.h @@ -63,7 +63,7 @@ typedef struct _RPC_INTERFACE_T MUTEX_T Mutex; ULONG EpMapperFlags; RPC_MGR_EPV PTR_T pMgrEpv; - RPC_IF_CALLBACK_FN PTR_T IfSecurityCallback; + RPC_IF_CALLBACK_FN PTR_T IfCallbackFn; RPC_SERVER_INTERFACE_T RpcServerInterface; MIDL_SYNTAX_INFO PTR_T pSyntaxInfo; VOID PTR_T pTransfertSyntaxes; @@ -74,7 +74,7 @@ typedef struct _RPC_INTERFACE_T UUID_VECTOR PTR_T pUuidVector; SIMPLE_DICT_T RpcInterfaceManagerDict; UCHAR Annotation[64]; - RPC_IF_CALLBACK_FN PTR_T IfCallbackFn; + RPC_IF_CALLBACK_FN PTR_T IfSecurityCallback; ULONG IsCallSizeLimitReached; ULONG currentNullManagerCalls; ULONG currentAutoListenCalls; @@ -113,4 +113,4 @@ typedef struct _RPC_ADDRESS_T { #pragma pack() -#endif // _RPC_INTERNALS_H_ \ No newline at end of file +#endif // _RPC_INTERNALS_H_ diff --git a/RpcCore/RpcCore4_32bits/RpcInternals.h b/RpcCore/RpcCore4_32bits/RpcInternals.h index b8c0101..aaa1933 100644 --- a/RpcCore/RpcCore4_32bits/RpcInternals.h +++ b/RpcCore/RpcCore4_32bits/RpcInternals.h @@ -130,7 +130,7 @@ typedef struct _RPC_INTERFACE_T MUTEX_T Mutex; ULONG EpMapperFlags; RPC_MGR_EPV PTR_T pMgrEpv; - RPC_IF_CALLBACK_FN PTR_T IfSecurityCallback; + RPC_IF_CALLBACK_FN PTR_T IfCallbackFn; RPC_SERVER_INTERFACE_T RpcServerInterface; MIDL_SYNTAX_INFO PTR_T pSyntaxInfo; VOID PTR_T pTransfertSyntaxes; @@ -141,7 +141,7 @@ typedef struct _RPC_INTERFACE_T UUID_VECTOR PTR_T pUuidVector; SIMPLE_DICT_T RpcInterfaceManagerDict; UCHAR Annotation[64]; - RPC_IF_CALLBACK_FN PTR_T IfCallbackFn; + RPC_IF_CALLBACK_FN PTR_T IfSecurityCallback; ULONG IsCallSizeLimitReached; ULONG currentNullManagerCalls; ULONG currentAutoListenCalls;