[PATCH] supplicant/p2p: Fix use-after free crash.

Jouni Malinen j
Thu May 10 01:02:26 PDT 2012


On Wed, May 09, 2012 at 01:06:28PM -0700, Ben Greear wrote:
> If I ever actually need P2P to work, I might make an attempt.
> In the meantime, as long as it doesn't crash stuff I'm happy.
> 
> Maybe just re-build the global->p2p data after its station is deleted
> using any remaining stations?

I committed the simple fix for now, i.e., disable P2P on removal of the
specific interface. P2P will be re-enabled on addition of the next
interface. It would be possible to re-initialize P2P based on other
interfaces (or just update the p2p->cfg->msg_ctx without
p2p_init/p2p_deinit). However, there are assumptions in how upper layer
programs manage P2P and that would get pretty messy if the specific
management interface would change dynamically. As such, I think it is
fine to leave this at the simplest level of just making sure non-P2P
operations do not get affected and the process does not crash on use of
freed memory.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list