alpine 3.6
access weakness #47

4

Weakness Breakdown


Definition:

An access weakness occurs when software does not properly implement permissions that could have unintended consequences if exploited by malicious actors. An example of this weakness is when a default username and password are set by the developer but do not get changed by the system administrator.

Warning code(s):

If this call fails, the program could fail to drop heightened privileges.

File Name:

wine/src/wine-2.0.1/dlls/rpcrt4/rpc_binding.c

Context:

The highlighted line of code below is the trigger point of this particular Alpine 3.6 access weakness.

     if (bind->Assoc) RpcAssoc_Release(bind->Assoc);
    bind->Assoc = NULL;

    return RPC_S_OK;
}

/***********************************************************************
 *             RpcImpersonateClient (RPCRT4.@)
 *
 * Impersonates the client connected via a binding handle so that security
 * checks are done in the context of the client.
 *
 * PARAMS
 *  BindingHandle [I] Handle to the binding to the client.
 *
 * RETURNS
 *  Success: RPS_S_OK.
 *  Failure: RPC_STATUS value.
 *
 * NOTES
 *
 * If BindingHandle is NULL then the function impersonates the client
 * connected to the binding handle of the current thread.
 */
RPC_STATUS WINAPI RpcImpersonateClient(RPC_BINDING_HANDLE BindingHandle)
{
    RpcBinding *bind;

    TRACE("(%p)\n", BindingHandle);

    if (!BindingHandle) BindingHandle = I_RpcGetCurrentCallHandle();
    if (!BindingHandle) return RPC_S_INVALID_BINDING;

    bind = BindingHandle;
    if (bind->FromConn)
        return rpcrt4_conn_impersonate_client(bind->FromConn);
    return RPC_S_WRONG_KIND_OF_BINDING;
}

/***********************************************************************
 *             RpcRevertToSelfEx (RPCRT4.@)
 *
 * Stops impersonating the client connected to the binding handle so that security
 * checks are no longer done in the context of the client.
 *
 * PARAMS
 *  BindingHandle [I] Handle to the binding to the client.
 *
 * RETURNS
 *  Success: RPS_S_OK. 

The registered trademark Linux® is used pursuant to a sublicense from the Linux Foundation, the exclusive licensee of Linus Torvalds, owner of the mark on a world­wide basis.