eap-authenticator: Enforce failure if MSK generation fails
Without this, the authentication succeeded if the server sent an early
EAP-Success message for mutual, key-generating EAP methods like EAP-TLS,
which may be used in EAP-only scenarios but would complete without server
or client authentication. For clients configured for such EAP-only
scenarios, a rogue server could capture traffic after the tunnel is
established or even access hosts behind the client. For non-mutual EAP
methods, public key server authentication has been enforced for a while.
A server previously could also crash a client by sending an EAP-Success
immediately without initiating an actual EAP method.
Fixes: 0706c39cda ("added support for EAP methods not establishing an MSK")
Fixes: CVE-2021-45079
This commit is contained in:
@@ -195,7 +195,7 @@ METHOD(eap_method_t, get_type, eap_type_t,
|
||||
METHOD(eap_method_t, get_msk, status_t,
|
||||
private_eap_gtc_t *this, chunk_t *msk)
|
||||
{
|
||||
return FAILED;
|
||||
return NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
METHOD(eap_method_t, get_identifier, uint8_t,
|
||||
|
||||
@@ -213,7 +213,7 @@ METHOD(eap_method_t, get_type, eap_type_t,
|
||||
METHOD(eap_method_t, get_msk, status_t,
|
||||
private_eap_md5_t *this, chunk_t *msk)
|
||||
{
|
||||
return FAILED;
|
||||
return NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
METHOD(eap_method_t, is_mutual, bool,
|
||||
|
||||
@@ -733,7 +733,9 @@ METHOD(eap_method_t, get_msk, status_t,
|
||||
*out = msk;
|
||||
return SUCCESS;
|
||||
}
|
||||
return FAILED;
|
||||
/* we assume the selected method did not establish an MSK, if it failed
|
||||
* to establish one, process() would have failed */
|
||||
return NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
METHOD(eap_method_t, get_identifier, uint8_t,
|
||||
|
||||
Reference in New Issue
Block a user