linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Marshaling issues w/ compat-wireless-2010-08-19
@ 2010-08-25  1:18 Philip Prindeville
  2010-08-25  8:11 ` Johannes Berg
  2010-08-28 17:12 ` Jouni Malinen
  0 siblings, 2 replies; 13+ messages in thread
From: Philip Prindeville @ 2010-08-25  1:18 UTC (permalink / raw)
  To: linux-wireless; +Cc: Jouni Malinen, Johannes Berg

  I've got a stock Fedora Core 13 install (updated today) with the hostapd-0.6.10 rpm and hostapd-0.7.2 compiled from sources.  The NIC is a Ubiquiti SR71e (AR9280).

I installed compat-wireless-2010-08-19 after patching it with Johannes's fix posted earlier today.

I can confirm that hostapd and iw are no longer hitting the "Illegal nla->nla_type == 0" message when run.

But I'm seeing something else.

(1) "Unknown event 5" messages when starting up hostapd (line 95 below):
(2) Some highly unlikely values from the hostapd debugging messages when parsing out WEP authentication messages (line 507):

This is captured in http://pastebin.ca/1924659 :

authentication: STA=f8:1e:df:1e:c2:23 auth_alg=35510 auth_transaction=79 status_code=21688 wep=1
Unsupported authentication algorithm (35510)


I'm wondering if some messages that are passed up to user-space via netlink from the driver might have changed their schema, i.e. adding new fields in the middle of a structure or moving fields around within a structure.

Am I on the wrong track?  How to go about resolving this?

Thanks,

-Philip



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Marshaling issues w/ compat-wireless-2010-08-19
  2010-08-25  1:18 Marshaling issues w/ compat-wireless-2010-08-19 Philip Prindeville
@ 2010-08-25  8:11 ` Johannes Berg
  2010-08-25  8:20   ` Johannes Berg
  2010-08-28 17:12 ` Jouni Malinen
  1 sibling, 1 reply; 13+ messages in thread
From: Johannes Berg @ 2010-08-25  8:11 UTC (permalink / raw)
  To: Philip Prindeville; +Cc: linux-wireless, Jouni Malinen

On Tue, 2010-08-24 at 18:18 -0700, Philip Prindeville wrote:

> (1) "Unknown event 5" messages when starting up hostapd (line 95
> below):

That's fine, it's just EVENT_INTERFACE_STATUS.

> (2) Some highly unlikely values from the hostapd debugging messages
> when parsing out WEP authentication messages (line 507):
> 
> This is captured in http://pastebin.ca/1924659 :
> 
> authentication: STA=f8:1e:df:1e:c2:23 auth_alg=35510 auth_transaction=79 status_code=21688 wep=1
> Unsupported authentication algorithm (35510)
> 
> 
> I'm wondering if some messages that are passed up to user-space via
> netlink from the driver might have changed their schema, i.e. adding
> new fields in the middle of a structure or moving fields around within
> a structure.

Looks more like a crypto problem to me, as this should be the encrypted
challenge in your shared key handshake. IOW, it looks like the frame
isn't getting decrypted by mac80211 for some reason.

johannes


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Marshaling issues w/ compat-wireless-2010-08-19
  2010-08-25  8:11 ` Johannes Berg
@ 2010-08-25  8:20   ` Johannes Berg
  2010-08-25 17:23     ` Philip Prindeville
  0 siblings, 1 reply; 13+ messages in thread
From: Johannes Berg @ 2010-08-25  8:20 UTC (permalink / raw)
  To: Philip Prindeville; +Cc: linux-wireless, Jouni Malinen

On Wed, 2010-08-25 at 10:11 +0200, Johannes Berg wrote:

> > authentication: STA=f8:1e:df:1e:c2:23 auth_alg=35510 auth_transaction=79 status_code=21688 wep=1
> > Unsupported authentication algorithm (35510)
> > 
> > 
> > I'm wondering if some messages that are passed up to user-space via
> > netlink from the driver might have changed their schema, i.e. adding
> > new fields in the middle of a structure or moving fields around within
> > a structure.
> 
> Looks more like a crypto problem to me, as this should be the encrypted
> challenge in your shared key handshake. IOW, it looks like the frame
> isn't getting decrypted by mac80211 for some reason.

Works fine here in hwsim, so likely to be either a driver problem (hw
decrypts frame, but driver doesn't tell us so), something that has been
fixed between then and now, or a compat specific problem.

johannes


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Marshaling issues w/ compat-wireless-2010-08-19
  2010-08-25  8:20   ` Johannes Berg
@ 2010-08-25 17:23     ` Philip Prindeville
  2010-08-25 18:42       ` Philip Prindeville
  0 siblings, 1 reply; 13+ messages in thread
From: Philip Prindeville @ 2010-08-25 17:23 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Jouni Malinen

  On 8/25/10 1:20 AM, Johannes Berg wrote:
> On Wed, 2010-08-25 at 10:11 +0200, Johannes Berg wrote:
>
>>> authentication: STA=f8:1e:df:1e:c2:23 auth_alg=35510 auth_transaction=79 status_code=21688 wep=1
>>> Unsupported authentication algorithm (35510)
>>>
>>>
>>> I'm wondering if some messages that are passed up to user-space via
>>> netlink from the driver might have changed their schema, i.e. adding
>>> new fields in the middle of a structure or moving fields around within
>>> a structure.
>> Looks more like a crypto problem to me, as this should be the encrypted
>> challenge in your shared key handshake. IOW, it looks like the frame
>> isn't getting decrypted by mac80211 for some reason.
> Works fine here in hwsim, so likely to be either a driver problem (hw
> decrypts frame, but driver doesn't tell us so), something that has been
> fixed between then and now, or a compat specific problem.
>
> johannes

I'll bump to yesterday's baking, apply your patch, and retry.  Maybe it was a spurious issue.

If that doesn't work, I'll try forcing h/w decryption off in the NIC.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Marshaling issues w/ compat-wireless-2010-08-19
  2010-08-25 17:23     ` Philip Prindeville
@ 2010-08-25 18:42       ` Philip Prindeville
  2010-08-25 18:44         ` Johannes Berg
  0 siblings, 1 reply; 13+ messages in thread
From: Philip Prindeville @ 2010-08-25 18:42 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Jouni Malinen

  On 8/25/10 10:23 AM, Philip Prindeville wrote:
>  On 8/25/10 1:20 AM, Johannes Berg wrote:
>> On Wed, 2010-08-25 at 10:11 +0200, Johannes Berg wrote:
>>
>>>> authentication: STA=f8:1e:df:1e:c2:23 auth_alg=35510 auth_transaction=79 status_code=21688 wep=1
>>>> Unsupported authentication algorithm (35510)
>>>>
>>>>
>>>> I'm wondering if some messages that are passed up to user-space via
>>>> netlink from the driver might have changed their schema, i.e. adding
>>>> new fields in the middle of a structure or moving fields around within
>>>> a structure.
>>> Looks more like a crypto problem to me, as this should be the encrypted
>>> challenge in your shared key handshake. IOW, it looks like the frame
>>> isn't getting decrypted by mac80211 for some reason.
>> Works fine here in hwsim, so likely to be either a driver problem (hw
>> decrypts frame, but driver doesn't tell us so), something that has been
>> fixed between then and now, or a compat specific problem.
>>
>> johannes
>
> I'll bump to yesterday's baking, apply your patch, and retry.  Maybe it was a spurious issue.
>
> If that doesn't work, I'll try forcing h/w decryption off in the NIC.


Retried with yesterday's baking.  No joy.  Also reloaded the module with nohwcrypt=1 and same result (except that the value in the auth_alg field changed from 6421 to 44995).



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Marshaling issues w/ compat-wireless-2010-08-19
  2010-08-25 18:42       ` Philip Prindeville
@ 2010-08-25 18:44         ` Johannes Berg
  0 siblings, 0 replies; 13+ messages in thread
From: Johannes Berg @ 2010-08-25 18:44 UTC (permalink / raw)
  To: Philip Prindeville; +Cc: linux-wireless, Jouni Malinen

On Wed, 2010-08-25 at 11:42 -0700, Philip Prindeville wrote:

> Retried with yesterday's baking.  No joy.  Also reloaded the module
> with nohwcrypt=1 and same result (except that the value in the
> auth_alg field changed from 6421 to 44995).

Well, I'd expect it to change all the time since it's encrypted and
depends on the WEP IV :)

But you'll have to figure out why the frame isn't decrypted. I'm not
sure why, I haven't ever seen this issue.

johannes


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Marshaling issues w/ compat-wireless-2010-08-19
  2010-08-25  1:18 Marshaling issues w/ compat-wireless-2010-08-19 Philip Prindeville
  2010-08-25  8:11 ` Johannes Berg
@ 2010-08-28 17:12 ` Jouni Malinen
  2010-08-28 17:19   ` Philip Prindeville
  1 sibling, 1 reply; 13+ messages in thread
From: Jouni Malinen @ 2010-08-28 17:12 UTC (permalink / raw)
  To: Philip Prindeville; +Cc: linux-wireless, Johannes Berg

On Tue, Aug 24, 2010 at 06:18:44PM -0700, Philip Prindeville wrote:
>  I've got a stock Fedora Core 13 install (updated today) with the hostapd-0.6.10 rpm and hostapd-0.7.2 compiled from sources.  The NIC is a Ubiquiti SR71e (AR9280).

> (2) Some highly unlikely values from the hostapd debugging messages when parsing out WEP authentication messages (line 507):

> authentication: STA=f8:1e:df:1e:c2:23 auth_alg=35510 auth_transaction=79 status_code=21688 wep=1
> Unsupported authentication algorithm (35510)

I was unable to reproduce this with the current development tree
snapshots. Shared key authentication worked with AR9280 and the current
wireless-testing.git and hostap.git in my tests. If you are still seeing
this, you could also try to disable hw crypto to remove one possible
issue area by using nohwcrypt=1 module parameter when loading ath9k.

-- 
Jouni Malinen                                            PGP id EFC895FA

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Marshaling issues w/ compat-wireless-2010-08-19
  2010-08-28 17:12 ` Jouni Malinen
@ 2010-08-28 17:19   ` Philip Prindeville
  2010-08-31  1:07     ` Philip Prindeville
  0 siblings, 1 reply; 13+ messages in thread
From: Philip Prindeville @ 2010-08-28 17:19 UTC (permalink / raw)
  To: Jouni Malinen; +Cc: linux-wireless, Johannes Berg

  On 8/28/10 11:12 AM, Jouni Malinen wrote:
> On Tue, Aug 24, 2010 at 06:18:44PM -0700, Philip Prindeville wrote:
>>   I've got a stock Fedora Core 13 install (updated today) with the hostapd-0.6.10 rpm and hostapd-0.7.2 compiled from sources.  The NIC is a Ubiquiti SR71e (AR9280).
>> (2) Some highly unlikely values from the hostapd debugging messages when parsing out WEP authentication messages (line 507):
>> authentication: STA=f8:1e:df:1e:c2:23 auth_alg=35510 auth_transaction=79 status_code=21688 wep=1
>> Unsupported authentication algorithm (35510)
> I was unable to reproduce this with the current development tree
> snapshots. Shared key authentication worked with AR9280 and the current
> wireless-testing.git and hostap.git in my tests. If you are still seeing
> this, you could also try to disable hw crypto to remove one possible
> issue area by using nohwcrypt=1 module parameter when loading ath9k.
>

Already tried that, and it didn't help.

-Philip


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Marshaling issues w/ compat-wireless-2010-08-19
  2010-08-28 17:19   ` Philip Prindeville
@ 2010-08-31  1:07     ` Philip Prindeville
  2010-09-03 21:52       ` Philip Prindeville
  0 siblings, 1 reply; 13+ messages in thread
From: Philip Prindeville @ 2010-08-31  1:07 UTC (permalink / raw)
  To: Jouni Malinen; +Cc: linux-wireless, Johannes Berg

  On 8/28/10 10:19 AM, Philip Prindeville wrote:
>  On 8/28/10 11:12 AM, Jouni Malinen wrote:
>> On Tue, Aug 24, 2010 at 06:18:44PM -0700, Philip Prindeville wrote:
>>>   I've got a stock Fedora Core 13 install (updated today) with the hostapd-0.6.10 rpm and hostapd-0.7.2 compiled from sources.  The NIC is a Ubiquiti SR71e (AR9280).
>>> (2) Some highly unlikely values from the hostapd debugging messages when parsing out WEP authentication messages (line 507):
>>> authentication: STA=f8:1e:df:1e:c2:23 auth_alg=35510 auth_transaction=79 status_code=21688 wep=1
>>> Unsupported authentication algorithm (35510)
>> I was unable to reproduce this with the current development tree
>> snapshots. Shared key authentication worked with AR9280 and the current
>> wireless-testing.git and hostap.git in my tests. If you are still seeing
>> this, you could also try to disable hw crypto to remove one possible
>> issue area by using nohwcrypt=1 module parameter when loading ath9k.
>>
>
> Already tried that, and it didn't help.
>
> -Philip

I also tried with the tarballs from 2010-07-19, and 2010-08-29 and saw the same issue.

I also was able to reproduce the issue with "nohwcrypt=1".

So I'm wondering what if decryption is working fine, but the buffer has an alignment issue or isn't being marshaled into netlink properly?

-Philip


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Marshaling issues w/ compat-wireless-2010-08-19
  2010-08-31  1:07     ` Philip Prindeville
@ 2010-09-03 21:52       ` Philip Prindeville
  2010-09-04  8:43         ` Johannes Berg
  0 siblings, 1 reply; 13+ messages in thread
From: Philip Prindeville @ 2010-09-03 21:52 UTC (permalink / raw)
  To: Jouni Malinen; +Cc: linux-wireless, Johannes Berg, Guy, Wey-Yi

  On 8/30/10 6:07 PM, Philip Prindeville wrote:
>  On 8/28/10 10:19 AM, Philip Prindeville wrote:
>>  On 8/28/10 11:12 AM, Jouni Malinen wrote:
>>> On Tue, Aug 24, 2010 at 06:18:44PM -0700, Philip Prindeville wrote:
>>>>   I've got a stock Fedora Core 13 install (updated today) with the hostapd-0.6.10 rpm and hostapd-0.7.2 compiled from sources.  The NIC is a Ubiquiti SR71e (AR9280).
>>>> (2) Some highly unlikely values from the hostapd debugging messages when parsing out WEP authentication messages (line 507):
>>>> authentication: STA=f8:1e:df:1e:c2:23 auth_alg=35510 auth_transaction=79 status_code=21688 wep=1
>>>> Unsupported authentication algorithm (35510)
>>> I was unable to reproduce this with the current development tree
>>> snapshots. Shared key authentication worked with AR9280 and the current
>>> wireless-testing.git and hostap.git in my tests. If you are still seeing
>>> this, you could also try to disable hw crypto to remove one possible
>>> issue area by using nohwcrypt=1 module parameter when loading ath9k.
>>>
>>
>> Already tried that, and it didn't help.
>>
>> -Philip
>
> I also tried with the tarballs from 2010-07-19, and 2010-08-29 and saw the same issue.
>
> I also was able to reproduce the issue with "nohwcrypt=1".
>
> So I'm wondering what if decryption is working fine, but the buffer has an alignment issue or isn't being marshaled into netlink properly?
>
> -Philip

Just following up: I isolated the problem.

I had taken the sample hostapd.conf that comes with hostapd-0.7.2 and copied it into /etc/.

Then I enabled the following commented out fields:

bridge=br0
driver=nl80211
ssid=my-hp-test
country_code=US
hw_mode=g
channel=10
wep_default_key=0
wep_key0=123456789a
ieee80211n=1

but what broke it was:

wep_key_len_broadcast=5
wep_key_len_unicast=5
wep_rekey_period=300

if I turned off those last 3, things work again.  Note also that using "nohwcrypt=1" didn't affect anything.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Marshaling issues w/ compat-wireless-2010-08-19
  2010-09-03 21:52       ` Philip Prindeville
@ 2010-09-04  8:43         ` Johannes Berg
  2010-09-04 22:45           ` Philip Prindeville
  0 siblings, 1 reply; 13+ messages in thread
From: Johannes Berg @ 2010-09-04  8:43 UTC (permalink / raw)
  To: Philip Prindeville; +Cc: Jouni Malinen, linux-wireless, Guy, Wey-Yi

On Fri, 2010-09-03 at 14:52 -0700, Philip Prindeville wrote:

> Just following up: I isolated the problem.
> 
> I had taken the sample hostapd.conf that comes with hostapd-0.7.2 and copied it into /etc/.
> 
> Then I enabled the following commented out fields:
> 
> bridge=br0
> driver=nl80211
> ssid=my-hp-test
> country_code=US
> hw_mode=g
> channel=10
> wep_default_key=0
> wep_key0=123456789a
> ieee80211n=1
> 
> but what broke it was:
> 
> wep_key_len_broadcast=5
> wep_key_len_unicast=5
> wep_rekey_period=300
> 
> if I turned off those last 3, things work again. 

Hah. I don't even know what that does. What were you trying to achieve?
Aren't those related to dynamic WEP, but you configured static WEP?

johannes


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Marshaling issues w/ compat-wireless-2010-08-19
  2010-09-04  8:43         ` Johannes Berg
@ 2010-09-04 22:45           ` Philip Prindeville
  2010-09-14 13:04             ` Johannes Berg
  0 siblings, 1 reply; 13+ messages in thread
From: Philip Prindeville @ 2010-09-04 22:45 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Jouni Malinen, linux-wireless, Guy, Wey-Yi

  On 9/4/10 1:43 AM, Johannes Berg wrote:
> On Fri, 2010-09-03 at 14:52 -0700, Philip Prindeville wrote:
>
>> Just following up: I isolated the problem.
>>
>> I had taken the sample hostapd.conf that comes with hostapd-0.7.2 and copied it into /etc/.
>>
>> Then I enabled the following commented out fields:
>>
>> bridge=br0
>> driver=nl80211
>> ssid=my-hp-test
>> country_code=US
>> hw_mode=g
>> channel=10
>> wep_default_key=0
>> wep_key0=123456789a
>> ieee80211n=1
>>
>> but what broke it was:
>>
>> wep_key_len_broadcast=5
>> wep_key_len_unicast=5
>> wep_rekey_period=300
>>
>> if I turned off those last 3, things work again.
> Hah. I don't even know what that does. What were you trying to achieve?
> Aren't those related to dynamic WEP, but you configured static WEP?
>
> johannes
>

I was trying to test the rekeying feature, where new keys are multicast when the group membership changes.



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Marshaling issues w/ compat-wireless-2010-08-19
  2010-09-04 22:45           ` Philip Prindeville
@ 2010-09-14 13:04             ` Johannes Berg
  0 siblings, 0 replies; 13+ messages in thread
From: Johannes Berg @ 2010-09-14 13:04 UTC (permalink / raw)
  To: Philip Prindeville; +Cc: Jouni Malinen, linux-wireless, Guy, Wey-Yi

On Sat, 2010-09-04 at 15:45 -0700, Philip Prindeville wrote:

> >> bridge=br0
> >> driver=nl80211
> >> ssid=my-hp-test
> >> country_code=US
> >> hw_mode=g
> >> channel=10
> >> wep_default_key=0
> >> wep_key0=123456789a
> >> ieee80211n=1
> >>
> >> but what broke it was:
> >>
> >> wep_key_len_broadcast=5
> >> wep_key_len_unicast=5
> >> wep_rekey_period=300
> >>
> >> if I turned off those last 3, things work again.
> > Hah. I don't even know what that does. What were you trying to achieve?
> > Aren't those related to dynamic WEP, but you configured static WEP?

> I was trying to test the rekeying feature, where new keys are multicast when the group membership changes.

But then you need WEP with 802.1X, not statically configured keys.

johannes


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2010-09-14 13:04 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-25  1:18 Marshaling issues w/ compat-wireless-2010-08-19 Philip Prindeville
2010-08-25  8:11 ` Johannes Berg
2010-08-25  8:20   ` Johannes Berg
2010-08-25 17:23     ` Philip Prindeville
2010-08-25 18:42       ` Philip Prindeville
2010-08-25 18:44         ` Johannes Berg
2010-08-28 17:12 ` Jouni Malinen
2010-08-28 17:19   ` Philip Prindeville
2010-08-31  1:07     ` Philip Prindeville
2010-09-03 21:52       ` Philip Prindeville
2010-09-04  8:43         ` Johannes Berg
2010-09-04 22:45           ` Philip Prindeville
2010-09-14 13:04             ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).