Re: [patch] don't try to access list members to free them unless already initialised

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

 



On Fri, Apr 21, 2023 at 10:58:42AM -0400, npiazza@xxxxxxxxxxx wrote:
> taken from openbsd ports, and used by many linux distributions.
> 
> https://github.com/openbsd/ports/blob/master/security/wpa_supplicant/patches/patch-src_utils_eloop_c
> 
> does it make sense to include it in wpa_supplicant?

Probably not unless someone can provide an explanation why that would be
needed.

> Don't try to access list members to free them unless already
> initialised
> 
> Index: src/utils/eloop.c
> @@ -1254,6 +1254,9 @@ void eloop_destroy(void)
>  	struct eloop_timeout *timeout, *prev;
>  	struct os_reltime now;
>  
> +	if (eloop.timeout.prev == NULL)
> +		return;

It is not valid to call eloop_destroy() without having first called
eloop_init() successfully. As such, this condition should never be
reached and should not be needed. If there are applications that do
indeed have eloop.timeout.prev == NULL when eloop_destroy() is being
called, those applications should be fixed instead.

-- 
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