SASL: Disallow beginning : and space anywhere in AUTHENTICATE parameter

This is a FIX FOR A SECURITY VULNERABILITY. All Charybdis users must
apply this fix if you support SASL on your servers, or unload m_sasl.so
in the meantime.
This commit is contained in:
Aaron Jones 2016-09-03 17:28:41 +00:00
parent f92b4d81d4
commit 818a3fda94
No known key found for this signature in database
GPG key ID: EC6F86EE9CD840B5

View file

@ -91,6 +91,12 @@ m_authenticate(struct Client *client_p, struct Client *source_p,
return 0;
}
if (*parv[1] == ':' || strchr(parv[1], ' '))
{
exit_client(client_p, client_p, client_p, "Malformed AUTHENTICATE");
return 0;
}
saslserv_p = find_named_client(ConfigFileEntry.sasl_service);
if (saslserv_p == NULL || !IsService(saslserv_p))
{