Re: [PATCH] Emit AuthBSS property

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 01, 2024 at 06:06:58PM +0000, Ruth Mekonnen wrote:
> This CL adds wpa_s->auth_bss and the getter AuthBSS to expose
> the BSS the STA is trying to connect to at the AUTHENTICATING
> state for SME devices and at the ASSOCIATING state for non-SME
> devices. When the state is set to ASSOCIATED or DISCONNECTED
> wpa_s->auth_bss set to null and emitted. The AuthBSS property
> can be used by platforms to track connection attempt success
> rates against APs.

This feels a bit unclear when there is already a CurrentBSS property
that seems to be used somewhat similarly. It would be helpful to update
doc/dbus.doxygen with clear description of the new AuthBSS property and
how it differs from the CurrentBSS property. At least for me, the name
AuthBSS seems to imply this has something to do with being
authenticated, but that is clearly not the case here since this is
cleared on not only when getting disconnected but also when getting
associated.

> diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c
> +dbus_bool_t wpas_dbus_getter_auth_bss(
> +{
> +	if (wpa_s->auth_bss && wpa_s->dbus_new_path)
> +		os_snprintf(bss_obj_path, WPAS_DBUS_OBJECT_PATH_MAX,
> +			    "%s/" WPAS_DBUS_NEW_BSSIDS_PART "/%u",
> +			    wpa_s->dbus_new_path, wpa_s->auth_bss->id);

This could be used to dereference wpa_s->auth_bss based on an external
operation. That would mean that there needs to be clear protection
making sure that wpa_s->auth_bss can never point to freed memory. It was
not obvious from the proposed changes that this would be the case. For
example, wpa_bss_remove() could be used to clear wpa_s->auth_bss if it
happens to point to a BSS entry that is being freed.

> diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h
> @@ -725,6 +725,7 @@ struct wpa_supplicant {
> +	struct wpa_bss *auth_bss;
>  	struct wpa_bss *current_bss;

It would likely be better to mark auth_bss const since it is not really
supposed to be used to modify anything in the BSS entry.

-- 
Jouni Malinen                                            PGP id EFC895FA

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux