Parcourir la source

WPS 2.0: Fix strict mode validation of UPnP MAC Address format

This was supposed to only reject the message from WPS 2.0 ER, not from
WPS 1.0 ER.
Jouni Malinen il y a 14 ans
Parent
commit
ac4dcaf7bf
1 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. 3 3
      src/wps/wps_upnp_web.c

+ 3 - 3
src/wps/wps_upnp_web.c

@@ -532,7 +532,7 @@ web_process_put_wlan_response(struct upnp_wps_device_sm *sm, char *data,
 				return UPNP_ARG_VALUE_INVALID;
 				return UPNP_ARG_VALUE_INVALID;
 			}
 			}
 		}
 		}
-#else /* CONFIG_WPS_STRICT */
+#endif /* CONFIG_WPS_STRICT */
 		if (hwaddr_aton2(val, macaddr) > 0) {
 		if (hwaddr_aton2(val, macaddr) > 0) {
 			/*
 			/*
 			 * At least some versions of Intel PROset seem to be
 			 * At least some versions of Intel PROset seem to be
@@ -540,13 +540,13 @@ web_process_put_wlan_response(struct upnp_wps_device_sm *sm, char *data,
 			 */
 			 */
 			wpa_printf(MSG_DEBUG, "WPS UPnP: Workaround - allow "
 			wpa_printf(MSG_DEBUG, "WPS UPnP: Workaround - allow "
 				   "incorrect MAC address format in "
 				   "incorrect MAC address format in "
-				   "NewWLANEventMAC");
+				   "NewWLANEventMAC: %s -> " MACSTR,
+				   val, MAC2STR(macaddr));
 		} else {
 		} else {
 			wpabuf_free(msg);
 			wpabuf_free(msg);
 			os_free(val);
 			os_free(val);
 			return UPNP_ARG_VALUE_INVALID;
 			return UPNP_ARG_VALUE_INVALID;
 		}
 		}
-#endif /* CONFIG_WPS_STRICT */
 	}
 	}
 	os_free(val);
 	os_free(val);
 	if (ev_type == UPNP_WPS_WLANEVENT_TYPE_EAP) {
 	if (ev_type == UPNP_WPS_WLANEVENT_TYPE_EAP) {