Search Linux Wireless

RE: [PATCH 1/2] mwifiex: return success in set_default_key for WPA/WPA2

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

 



Hi Johannes,

> -----Original Message-----
> From: Johannes Berg [mailto:johannes@xxxxxxxxxxxxxxxx]
> Sent: Tuesday, April 05, 2011 11:53 AM
> To: Bing Zhao
> Cc: linux-wireless@xxxxxxxxxxxxxxx; John W. Linville; Amitkumar Karwar; Kiran Divekar; Yogesh Powar;
> Marc Yang; Frank Huang; Jouni Malinen
> Subject: RE: [PATCH 1/2] mwifiex: return success in set_default_key for WPA/WPA2
> 
> Hi,
> 
> > > Ok Jouni and I just discussed this briefly, and it looks like there is
> > > indeed a special case where the GTK is also set as the default TX key:
> > > this case is when the station requested "no pairwise" or when the AP did
> > > the same thing in the configuration.
> >
> > From the wpa_supplicant debug log generated by Amit, it seems that
> > set_default_key() is called while installing PTK to the driver. Is it
> > expected?
> >
> > WPA: Installing PTK to the driver.
> > WPA: RSC - hexdump(len=6): 00 00 00 00 00 00
> > wpa_driver_nl80211_set_key: ifindex=12 alg=2 addr=0x80a7168 key_idx=0 set_tx=1 seq_len=6 key_len=32
> >    addr=00:1b:2f:55:79:7e
> >
> > The complete log file is attached for your reference.
> 
> Hmm. I'll need to look at that in more detail. But yeah, set_tx=1
> indicates that it'll call set_default_key.
> 
> > > Is it possible that this just happens to be the case in your tests? It
> > > looks like that would be rather strange, but that's a corner case where
> > > the supplicant would possibly set the GTK as the default key.
> >
> > Not the same corner case. In our test both pairwise and groupwise are configured.
> >
> > >
> > > In any case, this patch seems wrong in that you should never return
> > > success if the operation actually failed.
> >
> > Could you please advise how we should resolve this?
> 
> What happens if you just reject the set_default_key and return -EINVAL
> instead of 0?

wpa_supplicant disconnects if we return -EINVAL in set_default_key handler.

WPA: Installing PTK to the driver.
WPA: RSC - hexdump(len=6): 00 00 00 00 00 00
wpa_driver_nl80211_set_key: ifindex=3 alg=2 addr=0x9f6eef8 key_idx=0 set_tx=1 seq_len=6 key_len=32
   addr=00:50:43:21:07:f8
nl80211: set_key default failed; err=-22 Invalid argument)
WPA: Failed to set PTK to the driver (alg=2 keylen=32 bssid=00:50:43:21:07:f8)
wpa_driver_nl80211_disconnect


Thanks,

Bing

ÿô.nlj·Ÿ®‰­†+%ŠË±é¥Šwÿº{.nlj·¥Š{±ÿ«zW¬³ø¡Ü}©ž²ÆzÚj:+v‰¨þø®w¥þŠàÞ¨è&¢)ß«a¶Úÿûz¹ÞúŽŠÝjÿŠwèf



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