fedora 24
access weakness #23

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:

FreeRDP-b02943ae98d76420e5d6ee801a2d54db1d28f3ef/winpr/libwinpr/sspi/sspi.c

Context:

The highlighted line of code below is the trigger point of this particular Fedora 24 access weakness.

 SECURITY_STATUS SEC_ENTRY sspi_FreeContextBuffer(void* pvContextBuffer)
{
	SECURITY_STATUS status;

	if (!g_Initialized)
		InitializeSspiModule(0);

	if (!(g_SspiW && g_SspiW->FreeContextBuffer))
		return SEC_E_UNSUPPORTED_FUNCTION;

	status = g_SspiW->FreeContextBuffer(pvContextBuffer);

	WLog_Print(g_Log, WLOG_DEBUG, "FreeContextBuffer: %s (0x%04X)", GetSecurityStatusString(status), status);

	return status;
}

SECURITY_STATUS SEC_ENTRY sspi_ImpersonateSecurityContext(PCtxtHandle phContext)
{
	SECURITY_STATUS status;

	if (!g_Initialized)
		InitializeSspiModule(0);

	if (!(g_SspiW && g_SspiW->ImpersonateSecurityContext))
		return SEC_E_UNSUPPORTED_FUNCTION;

	status = g_SspiW->ImpersonateSecurityContext(phContext);

	WLog_Print(g_Log, WLOG_DEBUG, "ImpersonateSecurityContext: %s (0x%04X)", GetSecurityStatusString(status), status);

	return status;
}

SECURITY_STATUS SEC_ENTRY sspi_InitializeSecurityContextW(PCredHandle phCredential, PCtxtHandle phContext,
							  SEC_WCHAR* pszTargetName, ULONG fContextReq, ULONG Reserved1, ULONG TargetDataRep,
							  PSecBufferDesc pInput, ULONG Reserved2, PCtxtHandle phNewContext,
							  PSecBufferDesc pOutput, PULONG pfContextAttr, PTimeStamp ptsExpiry)
{
	SECURITY_STATUS status;

	if (!g_Initialized)
		InitializeSspiModule(0);

	if (!(g_SspiW && g_SspiW->InitializeSecurityContextW))
		return SEC_E_UNSUPPORTED_FUNCTION;

	status = g_SspiW->InitializeSecurityContextW(phCredential, phContext,
						     pszTargetName, fContextReq, Reserved1, TargetDataRep, pInput,
						     Reserved2, phNewContext, pOutput, pfContextAttr, ptsExpiry); 

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.