Skip to content
This repository has been archived by the owner on Feb 12, 2019. It is now read-only.

Commit

Permalink
SASL: Disallow beginning : and space anywhere in AUTHENTICATE parameter
Browse files Browse the repository at this point in the history
> 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.

Specifically, this is an issue in how SASL is handled in
Charybdis-derived IRC daemons. The only practical attacks so far are
to fraudlently log in as other services accounts using SASL EXTERNAL.
There might be other vulnerabilities as a result of this, so it is best
to apply this patch ASAP.
  • Loading branch information
Xe committed Sep 3, 2016
1 parent 029685c commit a7f0776
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/m_sasl.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ mr_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;
}

if(source_p->preClient->sasl_complete) {
sendto_one(source_p, form_str(ERR_SASLALREADY), me.name, EmptyString(source_p->name) ? "*" : source_p->name);
return 0;
Expand Down Expand Up @@ -219,4 +224,3 @@ abort_sasl_exit(hook_data_client_exit *data)
if (data->target->preClient)
abort_sasl(data->target);
}

0 comments on commit a7f0776

Please sign in to comment.