[PATCH] wpa_supplicant: null pointer check before pmksa_cache_flush

Spinadel, David david.spinadel at intel.com
Mon Mar 11 06:55:17 EDT 2013


I'm not sure, it was a year ago and It was happening for me very often. Now I can't reproduce it, maybe it was fixed somehow.

David 

> -----Original Message-----
> From: hostap-bounces at lists.shmoo.com [mailto:hostap-
> bounces at lists.shmoo.com] On Behalf Of Jouni Malinen
> Sent: Sunday, March 10, 2013 17:18
> To: hostap at lists.shmoo.com
> Subject: Re: [PATCH] wpa_supplicant: null pointer check before
> pmksa_cache_flush
> 
> On Thu, Mar 07, 2013 at 11:12:01AM +0200, David Spinadel wrote:
> > Avoid segmentation fault in case of running wpa_supplicant w/o loaded
> driver.
> 
> > diff --git a/src/rsn_supp/wpa.c b/src/rsn_supp/wpa.c @@ -2622,7
> > +2622,8 @@ void wpa_sm_update_replay_ctr(struct wpa_sm *sm, const
> u8
> > *replay_ctr)  void wpa_sm_pmksa_cache_flush(struct wpa_sm *sm, void
> > *network_ctx)  {  #ifndef CONFIG_NO_WPA2
> > -	pmksa_cache_flush(sm->pmksa, network_ctx);
> > +	if (sm)
> > +		pmksa_cache_flush(sm->pmksa, network_ctx);
> 
> Could you please clarify what exactly you mean with "running without loaded
> driver"? I'm trying to figure out how it would be possible to hit a code path
> where this gets called with sm == NULL..
> 
> --
> Jouni Malinen                                            PGP id EFC895FA
> _______________________________________________
> HostAP mailing list
> HostAP at lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
---------------------------------------------------------------------
A member of the Intel Corporation group of companies

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.



More information about the HostAP mailing list