[PATCH 10/15] wpa_supplicant: Use UHR only with security profiles 0-9
Veerendranath Jakkam
veerendranath.jakkam at oss.qualcomm.com
Thu Nov 26 12:23:16 PST 2026
On 24-11-2026 14:23, Andrei Otcheretianski wrote:
> void wpa_supplicant_apply_uhr_overrides(
> struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
> - struct wpa_driver_associate_params *params)
> + struct wpa_bss *bss, struct wpa_driver_associate_params *params)
> {
> + const char *reason = NULL;
> +
> if (!ssid)
> return;
>
> params->disable_uhr = ssid->disable_uhr;
> + if (params->disable_uhr || !bss)
> + return;
> +
> + /* WPA3 Specification v3.6, 12.5: UHR requires security profile 0 - 9 */
> + if (!wpa_bss_get_ie_ext(bss, WLAN_EID_EXT_SECURITY_PROFILE))
> + reason = "BSS lacks Security Profile element";
> + else if (!wpa_s->sel_security_profile)
> + reason = "no security profile used";
> + else if (wpa_s->sel_security_profile->number > SEC_PROF_SAE)
> + reason = "security profile not allowed with UHR";
> +
> + if (!reason)
> + return;
> +
> +#ifdef CONFIG_TESTING_OPTIONS
> + if (wpa_s->conf->allow_uhr_without_secprof) {
> + wpa_dbg(wpa_s, MSG_DEBUG, "UHR: %s - allowed for testing",
> + reason);
> + return;
> + }
> +#endif /* CONFIG_TESTING_OPTIONS */
> +
> + wpa_dbg(wpa_s, MSG_DEBUG, "UHR: %s - disable UHR", reason);
> + params->disable_uhr = 1;
> }
>
I think this breaks drivers that do BSS selection themselves
(WPA_DRIVER_FLAGS_BSS_SELECTION).
With BSS selection offload, wpas_start_assoc_cb() passes only bssid_hint
to the driver. params.bssid is set only if the driver doesn't do BSS
selection, the network has a fixed BSSID. So the driver may pick a
different BSS from the one wpa_supplicant looked at.
But the new check looks only at the hinted BSS, and the result applies
to the whole connection. If the hinted BSS doesn't advertise a compliant
Security Profile element, UHR is disabled even when the driver connects
to another BSS of the same ESS that does advertise profile 0-9.
Also, nl80211_connect_common() uses NL80211_ATTR_DISABLE_UHR for both
the user's disable_uhr setting and a hinted BSS that fails the security
profile check. Therefore, the driver cannot distinguish between these
two cases or make a more appropriate per-BSS decision.
More information about the Hostap
mailing list