On Thu, 2013-11-14 at 17:48 +0200, Jukka Rissanen wrote:
> Hi,
>
> There is an issue when user is doing wifi scan and simultaneously
> disabling or enabling wifi technology. If there is a wifi scan going
> on but no results have been received from wpa_supplicant and if the
> wifi is then disabled, then when the scan results finally arrive,
> ConnMan will access already freed memory and possibly crash.
>
> The fix is to cancel any pending DBus calls to wpa_supplicant when
> the network interface is disabled or removed. Because of the various
> callbacks in gsupplicant, the resulting patch 2 looks quite ugly.
>
> Special care is taken to make sure that when the DBus call is cancelled,
> the user callback gets called and we do not leak memory. This in patch 1
> and relevant calls in patch 2.
>
> I have stress tested this patchset with valgrind and everything seems
> to work just fine and no memory leaks were introduced. But I might have
> missed some corner case so if possible please try it also.
This look a bit scary, and could probably be fixed differently with more
changes going into gsupplicant. But since no other solutions have been
posted, these patches are applied.
Cheers,
Patrik
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman