diff mbox series

EAP-TTLS: Reject non-TNC inner EAP methods when starting TNC

Message ID 20261103221236.4042336-1-rmekonnen@chromium.org
State New
Headers show
Series EAP-TTLS: Reject non-TNC inner EAP methods when starting TNC | expand

Commit Message

Ruth Mekonnen Nov. 3, 2026, 10:12 p.m. UTC
When TNC starts after a non-EAP Phase 2 authentication, the peer
did not check that the server's next request was actually an
EAP-TNC message, allowing the server to request other inner EAP
methods.

Add a check to ensure only EAP-TNC is accepted when TNC is active.

Signed-off-by: Ruth Mekonnen <rmekonnen@chromium.org>
---
 src/eap_peer/eap_ttls.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/src/eap_peer/eap_ttls.c b/src/eap_peer/eap_ttls.c
index 6adc22277..77c79994f 100644
--- a/src/eap_peer/eap_ttls.c
+++ b/src/eap_peer/eap_ttls.c
@@ -419,7 +419,8 @@  static int eap_ttls_phase2_request_eap_method(struct eap_sm *sm,
 
 	if (data->tnc_started) {
 		if (data->phase2_eap_type.vendor != EAP_VENDOR_IETF ||
-		    data->phase2_eap_type.method == EAP_TYPE_TNC) {
+		    data->phase2_eap_type.method == EAP_TYPE_TNC ||
+		    vendor != EAP_VENDOR_IETF || method != EAP_TYPE_TNC) {
 			wpa_printf(MSG_DEBUG, "EAP-TTLS: Unexpected EAP "
 				   "type %d for TNC", method);
 			return -1;