Ticket #925 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

[regression] WPA TKIP broken with HAL 0.9.18.0

Reported by: anonymous Assigned to: kelmo
Priority: major Milestone: version 0.9.3
Component: madwifi: driver Version: trunk
Keywords: Cc: gtm.kramer@inter.nl.net
Patch is attached: 0 Pending:

Description

I can not associate with my AP using WPA after r1705. The current r1747 still has this problem. r1705 works just fine.

Testing environment: Fedore Core 6 (rawhide, ~ test4) kernel: 2.6.18 Apple MacBook with Atheros 5424 wifi0: mac 10.3 phy 6.1 radio 10.2

Can this be caused by the new hal in > r1705?

Attachments

wpa_debug_ok-f.txt (6.1 kB) - added by gtm.kramer@inter.nl.net on 09/29/06 19:17:49.
wpa_supplicant debug output with working r1710
wpa_debug_fault-moredebug-f.txt (14.1 kB) - added by gtm.kramer@inter.nl.net on 09/29/06 19:19:34.
wpa_supplicant debug output with non-working r1711
newhalbsd.patch (7.8 kB) - added by bell_kin on 10/17/06 11:28:41.
Signed-off-by: Bell Kin <bell_kin@pek.com.tw>
r1710.txt (15.6 kB) - added by kelmo on 10/24/06 15:12:57.
r1710, TKIP, wpa_supplicant and athdebug +keycache
r1711.txt (30.0 kB) - added by kelmo on 10/24/06 15:13:29.
r1711, TKIP, wpa_supplicant and athdebug +keycache
r1756.txt (15.5 kB) - added by kelmo on 10/24/06 15:14:25.
r1756, TKIP, wpa_supplicant and athdebug +keycache

Change History

09/29/06 17:24:47 changed by anonymous

Forgot to mention, I'm using NetworkManager 0.6.4 (from FC6) to get my wireless connection going. With the newer SVN version (> 1705) it tries to connect but after a while it asks for the WPA passphrase again. Entering the correct passphrase does not help.

09/29/06 19:16:35 changed by gtm.kramer@inter.nl.net

See also bug #922. I've attached two logs from wpa_supplicant, working (r1710) and non-working (r1711).

09/29/06 19:17:49 changed by gtm.kramer@inter.nl.net

  • attachment wpa_debug_ok-f.txt added.

wpa_supplicant debug output with working r1710

09/29/06 19:19:34 changed by gtm.kramer@inter.nl.net

  • attachment wpa_debug_fault-moredebug-f.txt added.

wpa_supplicant debug output with non-working r1711

09/30/06 10:57:38 changed by kelmo

ACK. I have also reproduced this. The new HAL mentions (chipset specific) keycaching enhancements. Perhaps that is responsible for this awful regression.

10/01/06 14:27:33 changed by kelmo

This is specific to TKIP cipher, AES only works fine with same setup. Comments in the freebsd keycache patch that accompanied the "release notes" for the HAL seem to be TKIP specific.

10/11/06 07:48:03 changed by kelmo

  • summary changed from WPA broken for madwifi-ng > r1705 to [regression] WPA TKIP broken with HAL 0.9.18.0.

10/16/06 13:02:05 changed by kelmo

Contacted Sam Leffler about this regression, as it is most certainly related to changes in the opaque HAL.

10/17/06 01:25:12 changed by kelmo

Sam replied promptly, saying it works with NetBSD and FreeBSD and the information provided here and in the email was "useless". There was no comment about what information would be "useful".

I don't care to follow up problems in the opaque HAL any longer. Someone else may be able to provide "useful" info to him please. I am patheticly disappointed that a problem such as this would be dismissed so swiftly.

10/17/06 06:37:56 changed by mrenzmann

I recapitulated the available information and tried to be as verbose as possible about the possible causes of this issue. He said it works in NetBSD and FreeBSD, while we obviously have an issue. So the assumption that missing driver support for the "tkip mic keycache support" which has been introduced in HAL v0.9.18.0 could be the culprit has been pointed out again.

I saw the reply, and I agree with Kel: it was a short and quite harsh reply, lacking anything useful to determine what information actually if missing for him to be able to look at this issue. This type of response is annoying and counterproductive. Let's hope that I have better luck with my mail.

10/17/06 11:27:51 changed by bell_kin

  • status changed from new to assigned.
  • owner set to bell_kin.

Sam tend to redesign hal interface from time to time I tried apply the patch from freebsd, and here it is. try it?(I don't have 5424 right now)

10/17/06 11:28:41 changed by bell_kin

  • attachment newhalbsd.patch added.

Signed-off-by: Bell Kin <bell_kin@pek.com.tw>

10/17/06 12:06:42 changed by mrenzmann

Update: Sam replied to my mail and clarified in greater detail which kind of information is helpful to investigate in that issue. wpa_supplicant log files are not helpful, instead debug messages and/or athstats might give something helpful:

If there is a problem then you should be able to enable crypto debug msgs in the driver and show where the keys are properly installed but cipher operations are not properly done (presumably you'll get crypto errors that athstats will report).

He also states that the TKIP MIC keycache support in the HAL should not be causing any problems if the driver does not enable it. Nevertheless it would be good to make use of that feature, so thanks to Bell for taking care of the patch!

10/17/06 22:56:22 changed by anonymous

I just quickly tried the newhalbsd.patch, which managed to get me authenticated on a WPA-PSK TKIP network, using r1754 :) Will be able to test it more thoroughly and post more information if necessary tomorrow.

10/18/06 13:46:05 changed by kelmo

  • status changed from assigned to closed.
  • resolution set to fixed.

Acked. The patch allowed association to a TKIP access point, which was not possible since introduction of the new 0.9.18.0 HAL in r1711.

Applied in r1755.

Thanks bell!

10/20/06 06:44:26 changed by kelmo

  • status changed from closed to reopened.
  • resolution deleted.

Will reopen and assign this ticket to myself as a reminder to collect ath/net80211 debug data concerning claimed TKIP cipher regression, so that Sam maybe be of further help.

10/20/06 06:44:59 changed by kelmo

  • status changed from reopened to new.
  • owner changed from bell_kin to kelmo.

10/24/06 15:12:57 changed by kelmo

  • attachment r1710.txt added.

r1710, TKIP, wpa_supplicant and athdebug +keycache

10/24/06 15:13:29 changed by kelmo

  • attachment r1711.txt added.

r1711, TKIP, wpa_supplicant and athdebug +keycache

10/24/06 15:14:25 changed by kelmo

  • attachment r1756.txt added.

r1756, TKIP, wpa_supplicant and athdebug +keycache

10/28/06 06:47:33 changed by kelmo

  • status changed from new to closed.
  • resolution set to fixed.

Quoting Sam leffler:

Ok, I understand what's going on now.  I was able to reproduce things.
The issue is really an API incompatibility I introduced when I added the
new keycache support in the hal.  Before I added the ability to store
TKIP mic keys "combined" the driver would ask the hal if it was capable
of storing TKIP mic keys "together" or "split" using:

if (ath_hal_tkipsplit(ah))
        sc->sc_splitmic = 1;

This always evaluated s.t. the driver thought the mic keys were split
across 2 keycache entries and so did the usual work.  However when I
added the ability to store the mic keys in a single keycache entry I
made the above call return "the truth".  This meant that on parts where
it was possible to store keys either split or combined it said
"together" so sc_splitmic was NOT set to 1.  This broke compatibility
with the old driver/existing code.

Since r1755 madwifi supports the combined tkip entries, so this issue is mostly null and void.

It was agreed there was little point in modifying the HAL at this point.


Add/Change #925 ([regression] WPA TKIP broken with HAL 0.9.18.0)