Bug 453390

Summary: wifi problems with kernel 2.6.25.9-74
Product: [Fedora] Fedora Reporter: James Begley <fedora>
Component: kernelAssignee: John W. Linville <linville>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 9CC: axel.thimm, bbaetz, bloodhound, bojan, brebs, briemers, chemobejk, christoph.maser, cramerd, dcbw, djuran, emertens, fedora, gnomeuser, jonathan, jonathanr.pritchard+bugzilla, kdekorte, kernel-maint, kevin, klaas.hoelscher, m.a.young, mbooth, redhat-bugzilla, redhat, rhbugs, thras, turchi, vegard.nossum, walovaton, xfreebird
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 2.6.25.10-86.fc9 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-07-15 12:14:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 444847    
Attachments:
Description Flags
Extract from dmesg output
none
Extract from /var/log/messages
none
/var/log/wpa_supplicant
none
0001-Revert-mac80211-wpa.c-use-new-access-helpers.txt
none
Log Attempting to connect to WIFI Network
none
Corrected wireless fixup patch for kernel-2.6.25.9-81.fc9
none
wpa supplicant none

Description James Begley 2008-06-30 10:16:06 UTC
Description of problem:
Latest kernels from koji (2.6.25.9-74 and upwards) fail to associate with WPA2
access point.

Version-Release number of selected component (if applicable):
2.6.25.9-74 and 2.6.25.9-76

How reproducible:
Always

Steps to Reproduce:
1. Grab latest kernel from koji, install it and reboot to use it
2. Attempt to connect to WPA2 access point
  
Actual results:
Repeated attempts to enter password, each of which fail

Expected results:
Successful connection to the access point

Additional info:
This is running a laptop, using iwl3945 drivers.  Going back to kernel
2.6.25.9-72 solves the problem, so I guess that one of the wifi fixes in the -74
kernel has caused the problem.

Comment 1 James Begley 2008-06-30 10:16:06 UTC
Created attachment 310568 [details]
Extract from dmesg output

Comment 2 James Begley 2008-06-30 10:16:51 UTC
Created attachment 310569 [details]
Extract from /var/log/messages

Comment 3 Bradley 2008-06-30 10:21:41 UTC
MeToo. However, a PEAP AP at the same location works.

wpa_supplicant.log is filled with:

Trying to associate with 00:19:07:8e:1a:55 (SSID='AGSM2' freq=2412 MHz)
Associated with 00:19:07:8e:1a:55
WPA: Key negotiation completed with 00:19:07:8e:1a:55 [PTK=TKIP GTK=TKIP]
CTRL-EVENT-CONNECTED - Connection to 00:19:07:8e:1a:55 completed (auth) [id=0 id
_str=]
WPA: Group rekeying completed with 00:19:07:8e:1a:55 [GTK=TKIP]
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
WPA: EAPOL-Key Replay Counter did not increase - dropping packet
Associated with 00:19:07:8e:1a:55
WPA: Key negotiation completed with 00:19:07:8e:1a:55 [PTK=TKIP GTK=TKIP]
CTRL-EVENT-CONNECTED - Connection to 00:19:07:8e:1a:55 completed (reauth) [id=0 
id_str=]
WPA: Group rekeying completed with 00:19:07:8e:1a:55 [GTK=TKIP]
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys

while this is going on.

Comment 4 Bradley 2008-07-02 07:53:13 UTC
Also broken in kernel-2.6.25.9-79.fc9.x86_64 - iwl4965 for me. Confirmed broken
in two separate locations, one WPA1, one WPA2.

Comment 5 James Begley 2008-07-02 08:06:53 UTC
Yep, I can confirm that -79 kernel doesnt have working wifi for me either.  
Rolling back to the -72 kernel.

Is there any more information that I can give to help track this down and fix 
it?

Comment 6 Eric Mertens 2008-07-02 09:15:06 UTC
*** Bug 453735 has been marked as a duplicate of this bug. ***

Comment 7 Eric Mertens 2008-07-02 09:20:34 UTC
I'm a victim of this bug as well and can provide information as directed or test
fixes

Comment 8 John W. Linville 2008-07-02 15:14:36 UTC
*** Bug 453791 has been marked as a duplicate of this bug. ***

Comment 9 Christoph Maser 2008-07-02 16:32:39 UTC
Same problem here. -55 works -76 does not.

Comment 10 John W. Linville 2008-07-02 20:36:36 UTC
Could you try a rawhide kernel?  You may need to use the --force option to rpm:

   http://koji.fedoraproject.org/koji/buildinfo?buildID=54504

Does this behave any better?

Comment 11 John W. Linville 2008-07-02 20:38:06 UTC
If possible, please also describe the wireless networks you are using
(encryption methods, EAP type, etc).

Comment 12 John W. Linville 2008-07-02 20:40:39 UTC
Dan, any insight on what might cause those wpa_supplicant log entries?

Comment 13 John W. Linville 2008-07-02 20:44:25 UTC
*** Bug 453825 has been marked as a duplicate of this bug. ***

Comment 14 John W. Linville 2008-07-02 20:44:47 UTC
*** Bug 453819 has been marked as a duplicate of this bug. ***

Comment 15 John W. Linville 2008-07-02 20:45:55 UTC
*** Bug 453826 has been marked as a duplicate of this bug. ***

Comment 16 John W. Linville 2008-07-02 20:47:47 UTC
*** Bug 453833 has been marked as a duplicate of this bug. ***

Comment 17 Dan Williams 2008-07-02 20:55:21 UTC
Can the people having problems add "-dd" to the end of the Exec= line in
/usr/share/dbus-1/system-services/fi.epitest.hostap.WPASupplicant.service and
reboot, try to connect, and see if there's additional information about _why_
the supplicant can't reconnect?  The logs may have confidential information in
them, so you could mail them to me or John if you don't want to share them here.

Comment 18 Eric Mertens 2008-07-02 21:03:55 UTC
(In reply to comment #10)
> Could you try a rawhide kernel?  You may need to use the --force option to rpm:
> 
>    http://koji.fedoraproject.org/koji/buildinfo?buildID=54504
> 
> Does this behave any better?

I was able to connect to my work WPA2 protected network using this kernel. I
will check with my home network later this evening (where I originally was
unable to connect with the .9 kernel).

Comment 19 James Begley 2008-07-03 06:08:39 UTC
Created attachment 310888 [details]
/var/log/wpa_supplicant

Comment 20 James Begley 2008-07-03 06:11:46 UTC
I am able to connect to this netwrok using the latest rawhide kernel.

However, I'm not able to connect to the same network using the latest fedora 
kernel from koji (the -81 kernel).  Adding "-dd" to the WPASupplicant service 
(as detailed in comment #17) spews lots of information into the /var/log/
wpa_supplicant file, which is attached above.

Let me know if there is anything else I can do to help track this down.



Comment 21 John W. Linville 2008-07-03 13:58:19 UTC
*** Bug 453872 has been marked as a duplicate of this bug. ***

Comment 22 John W. Linville 2008-07-03 14:02:02 UTC
*** Bug 453864 has been marked as a duplicate of this bug. ***

Comment 23 John W. Linville 2008-07-03 14:04:04 UTC
FWIW, I agree w/ the comment here:

   https://bugzilla.redhat.com/process_bug.cgi#c6

Comment 24 John W. Linville 2008-07-03 14:05:03 UTC
Hmmm...that should be this url instead:

   https://bugzilla.redhat.com/show_bug.cgi?id=453864#c6

Comment 25 John W. Linville 2008-07-03 14:13:28 UTC
Created attachment 310926 [details]
0001-Revert-mac80211-wpa.c-use-new-access-helpers.txt

Anyone care to try building a kernel with this patch applied?

Comment 26 John W. Linville 2008-07-03 14:45:52 UTC
*** Bug 453953 has been marked as a duplicate of this bug. ***

Comment 27 John W. Linville 2008-07-03 17:21:45 UTC
*** Bug 453920 has been marked as a duplicate of this bug. ***

Comment 28 Michael Young 2008-07-03 19:20:13 UTC
(In reply to comment #25)
> Created an attachment (id=310926) [edit]
> 0001-Revert-mac80211-wpa.c-use-new-access-helpers.txt
> 
> Anyone care to try building a kernel with this patch applied?
I have done so, (-76+patch  x86_64 iwl4965) but wireless still doesn't seem to work.


Comment 29 Stefan Becker 2008-07-03 20:04:02 UTC
Same here: -81 + patch: no go :-(

I don't know about the other reporters, but in my setup I only use TKIP for
pairwise & group, so maybe these are the culprits?

      mac80211: tkip.c consolidate tkip IV writing in helper
      mac80211: tkip.c fold ieee80211_gen_rc4key into its one caller
      mac80211: tkip.c use a local struct tkip_ctx in ieee80211_get_tkip_key


Comment 30 davidgf 2008-07-03 23:19:07 UTC
Hi!

The same problem. See:

http://forums.fedoraforum.org/showthread.php?t=193296
http://www.fedoraforum.de/viewtopic.php?f=18&t=15817&start=0&st=0&sk=t&sd=a
http://forums.fedora-fr.org/viewtopic.php?pid=280094

I got the intel 3945 and its not working with WEP, WPA and with or without DHCP

Thanks!!

David


Comment 31 Stefan Becker 2008-07-04 09:35:07 UTC
I think one of the F9 wireless fixups is wrong. The patch changes
tkip.c/tkip_mixing_phase2() to this:

 	rc4key = write_tkip_iv(rc4key, tsc_IV16);
	*rc4key++ = Lo8((ppk[5] ^ Mk16(tk[1], tk[0])) >> 1);
 
	for (i = 0; i < 6; i++) {
		rc4key[4 + 2 * i] = Lo8(ppk[i]);
		rc4key[5 + 2 * i] = Hi8(ppk[i]);
	}

But the original code in
<http://git.kernel.org/?p=linux/kernel/git/linville/wireless-testing.git;a=blob;f=net/mac80211/tkip.c;hb=06e4dbbf6ea2fef4213da9c0a25c74715c7c9979>

has:

126         rc4key[0] = tsc_IV16 >> 8;
127         rc4key[1] = ((tsc_IV16 >> 8) | 0x20) & 0x7f;
128         rc4key[2] = tsc_IV16 & 0xFF;
129         rc4key[3] = ((ppk[5] ^ get_unaligned_le16(tk)) >> 1) & 0xFF;
130
131         rc4key += 4;
132         for (i = 0; i < 6; i++)
133                 put_unaligned_le16(ppk[i], rc4key + 2 * i);


So the new loop writes to rc4key with an incorrect offset of 4. The patch should
read

+	for (i = 0; i < 6; i++) {
+		rc4key[0 + 2 * i] = Lo8(ppk[i]);
+		rc4key[1 + 2 * i] = Hi8(ppk[i]);
+	}

I've started a RPM build for -81 with this change.

Comment 32 Kevin Kofler 2008-07-04 09:47:23 UTC
Uh, the original code did increment rc4key by 4. The problem is that the new 
code first increments rc4key by 1 with that ++, then by 4 again. So if I'm not 
mistaken, the correct offsets for the loop should be:
+       for (i = 0; i < 6; i++) {
+               rc4key[3 + 2 * i] = Lo8(ppk[i]);
+               rc4key[4 + 2 * i] = Hi8(ppk[i]);
+       }
or (EXCLUSIVE OR) the ++ from:
*rc4key++ = Lo8((ppk[5] ^ Mk16(tk[1], tk[0])) >> 1);
should be dropped (in which case the 4+ and 5+ offsets in the loop are 
correct).

Comment 33 Stefan Becker 2008-07-04 09:55:11 UTC
(In reply to comment #32)
> Uh, the original code did increment rc4key by 4. The problem is that the new 
> code first increments rc4key by 1 with that ++, then by 4 again. So if I'm not 
> mistaken, the correct offsets for the loop should be:

No the new code has

  rc4key = write_tkip_iv(rc4key, tsc_IV16);

The function returns rc4key + 3 which makes with the *rc4key++ in the next line
an offset of 4. That is exactly the same what the old code achieved with rc4key
+= 4.

Comment 34 Kevin Kofler 2008-07-04 09:58:53 UTC
Oh OK, it shows that I'm not a kernel developer. ;-) I should have checked the 
code of write_tkip_iv, sorry.

Comment 35 Luca Botti 2008-07-04 10:20:22 UTC
Created attachment 311029 [details]
Log Attempting to connect to WIFI Network

For me, the latest kernel does not work with wpa2 enterprise setup (see the
attached wpa_supplicant.log). Settings are:
WPA2 Enterprise
PEAP Authentication
no CA Certificate
PEAP version 0
MSCHAP v2 Inner Authentication

With the previous kernel versions, it works okay. I am using it right now to
send this bug report ;-)

Additionally, the issue is only with the previous setting. My Home WiFi setup
is also a WPA network, but with WPA2 Personal setup, and it works okay

Comment 36 Stefan Becker 2008-07-04 10:22:08 UTC
Created attachment 311030 [details]
Corrected wireless fixup patch for kernel-2.6.25.9-81.fc9

Bingo! WPA works again:

$ uname -r
2.6.25.9-81.local.fc9.i686
$ /sbin/ifconfig wlan0
wlan0	  Link encap:Ethernet  HWaddr 00:18:DE:23:AC:D9
	  inet addr:10.180.48.75  Bcast:10.180.51.255  Mask:255.255.252.0

Comment 37 Dennis Schäfers 2008-07-04 10:24:05 UTC
same here. rt61pci and atheros doesn't connect with kernel 2.6.25.9-74.
2.6.25.9-55 works fine.

Comment 38 Kevin Kofler 2008-07-04 12:59:41 UTC
Adding Patch keyword, fix available in comment #36 (thanks to Stefan Becker).

Comment 39 Michael Young 2008-07-04 18:56:21 UTC
Yes, -76 with the 2 line edit in Comment #31 works for me as well.

Comment 40 John W. Linville 2008-07-04 19:41:50 UTC
*** Bug 454035 has been marked as a duplicate of this bug. ***

Comment 41 John W. Linville 2008-07-04 20:34:11 UTC
Build with patch from comment 36 is available here (still in progress ATM):

   http://koji.fedoraproject.org/koji/buildinfo?buildID=54855

When it finishes, please try the resulting kernels.  Do they resolve the WPA
issue for you?

Comment 42 John W. Linville 2008-07-04 20:36:14 UTC
BTW...great work Stefan! :-)

Comment 43 David Nielsen 2008-07-04 23:01:31 UTC
Works for me on x86_64 using iwl3965 and WPA2.

Comment 44 Kevin Kofler 2008-07-05 06:03:47 UTC
2.6.25.10-85.fc9.x86_64 works for me too, iwl4965, WPA 1.

Comment 45 Stefan Becker 2008-07-05 06:33:55 UTC
2.6.25.10-85.fc9.i686 works for me too.

Comment 46 Eric Mertens 2008-07-05 06:45:13 UTC
kernel-2.6.25.10-85.fc9.x86_64 works for me (iwl3945 with both wpa and wpa2)
thank you!

Comment 47 Christoph Maser 2008-07-05 07:18:04 UTC
2.6.25.10-85.fc9.x86_64 WFM (iwl3945 with wpa2) thanks.

Comment 48 Steven Bakker 2008-07-05 07:51:08 UTC
kernel-2.6.25.10-85.fc9.i686, iwl3945, WPA2 (PSK); works like a charm. Thanks!

Comment 49 Bradley 2008-07-05 11:05:43 UTC
*** Bug 454036 has been marked as a duplicate of this bug. ***

Comment 50 David Nielsen 2008-07-05 17:40:56 UTC
Many success reports can we get this queued up for updates-testing for wider
testing?

Comment 51 Kevin Kofler 2008-07-05 17:47:29 UTC
Why updates-testing? This regression fix should be pushed straight to stable, 
ASAP, and likewise for the equivalent F8 fix!

Comment 52 David Nielsen 2008-07-05 18:07:10 UTC
it could have a few other nasty surprises, remember the current mess was caused
by pushing a security update plus a bunch of untested stuff directly.

Comment 53 Kevin Kofler 2008-07-05 18:12:32 UTC
But now the damage is done and breaks wireless for a huge number of users, so 
IMHO the fix should get out ASAP.

Comment 54 louisgtwo 2008-07-05 23:16:42 UTC
Sorry for sounding redundant but WFM too. I didn't want to be left out.

Comment 55 Andrea Bruna 2008-07-06 18:19:29 UTC
*** Bug 454187 has been marked as a duplicate of this bug. ***

Comment 56 James Begley 2008-07-06 22:48:03 UTC
Just to confimr that  the -85 kernel from koji works for me as well.

Thanks to Stefan and John for their hard work.

Comment 57 Axel Thimm 2008-07-07 04:25:19 UTC
Works on the rt73usb as well. Please do schedule an update - most laptop users
(e.g. the ones with proper security settings) are affected and this spoils user
experience with Fedora. Please fix it before it surfaces on /. or any other
nasty place. Thanks!

Comment 58 Stefan Becker 2008-07-07 14:31:13 UTC
I just verified on another laptop that the correction works on F8 too with
kernel-2.6.25.10-46.fc8 from koji.

Can we get this pushed out? The traffic generated by this bugzilla entry borders
on SPAM already :-/

Comment 59 Jonathan Pritchard 2008-07-07 15:11:54 UTC
I may be experiencing some form of this bug. Except it will connect fine, but I
was experiencing this repeated request for my WPA2-PSK network's secret even
though I entered it correctly after a suspend. Bug 453124 , might be a dupe
therefore.

Comment 60 Julian Sikorski 2008-07-07 15:48:55 UTC
Looks like -85.fc9 fixes the problem here as well. 

Comment 61 Dan Williams 2008-07-07 16:17:49 UTC
*** Bug 453882 has been marked as a duplicate of this bug. ***

Comment 62 Christoph Wickert 2008-07-07 17:42:47 UTC
kernel-2.6.25.10-85.fc9 fixes my wireless prbs. Please submit it at least for
updates-testing. TIA!

Comment 63 Simo Sorce 2008-07-07 19:37:52 UTC
Fixes for me as well, please push to updates-testing for easier wider testing

Comment 64 John W. Linville 2008-07-07 20:09:52 UTC
*** Bug 454342 has been marked as a duplicate of this bug. ***

Comment 65 Fedora Update System 2008-07-08 14:28:28 UTC
kernel-2.6.25.10-86.fc9 has been submitted as an update for Fedora 9

Comment 66 Fulko Hew 2008-07-08 14:52:22 UTC
What about an update for Fedora 8?


Comment 68 Dave Jones 2008-07-08 23:06:50 UTC
*** Bug 454504 has been marked as a duplicate of this bug. ***

Comment 69 Fedora Update System 2008-07-09 02:47:41 UTC
kernel-2.6.25.10-86.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update kernel'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-6198

Comment 70 John W. Linville 2008-07-10 13:27:36 UTC
*** Bug 454791 has been marked as a duplicate of this bug. ***

Comment 71 John W. Linville 2008-07-10 19:02:16 UTC
*** Bug 454154 has been marked as a duplicate of this bug. ***

Comment 72 Cristhian Parra 2008-07-13 23:55:35 UTC
Build from Comment #41 works for me too...

Comment 73 John W. Linville 2008-07-14 14:32:41 UTC
*** Bug 455258 has been marked as a duplicate of this bug. ***

Comment 74 Fedora Update System 2008-07-15 12:13:55 UTC
kernel-2.6.25.10-86.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 75 John W. Linville 2008-07-15 16:34:02 UTC
*** Bug 455419 has been marked as a duplicate of this bug. ***

Comment 76 Joel Eidsath 2008-07-17 02:06:42 UTC
The problem is still there with kernel-2.6.25.10-86.fc9 for me. (I've rebooted
back to 2.6.25.6-55.fc9.x86_64 and wireless works fine again.) 

I have the issue with the iwl4965 driver.

Comment 77 Stefan Becker 2008-07-17 04:46:05 UTC
(In reply to comment #76)
> The problem is still there with kernel-2.6.25.10-86.fc9 for me. (I've rebooted
> back to 2.6.25.6-55.fc9.x86_64 and wireless works fine again.) 
> 
> I have the issue with the iwl4965 driver.

Can you please provide a debug log from wpa_supplicant? You need to create a
configuration file with your wireless configuration (see man
wpa_supplicant.conf) and then:

   service NetworkManager stop
   service wpa_supplicant stop
   wpa_supplicant -i wlan0 -c wireless.conf -dd

You should get an output similiar to attachment #311029 [details]. Please be aware that
there might be some private information dumped in the log. The important
information to look for is these lines:

WPA: using GTK TKIP
WPA: using PTK TKIP
WPA: Key negotiation completed with XXXXX [PTK=TKIP GTK=TKIP]

The correction for this bug has only covered TKIP. If you see the something else
there I would suggest to open another bug for your problem.

Comment 78 Egon Kastelijn 2008-07-17 10:30:16 UTC
I updated my Fedora 9 kernel using yum.
My wireless works fine again.
I am removing myself from the CC list.

Comment 79 Ed Schofield 2008-07-17 11:40:14 UTC
Same here: works well for me; removing myself from the CC list. Thanks to all
involved.

Comment 80 Laurent MINOST 2008-07-17 23:52:19 UTC
Hi,

I have an Intel 3945ABG chip.
Tried with latest stable kernel-2.6.25.10-86.fc9 but without any success, so I
tried with these one :
kernel-2.6.25.6-55.fc9.i686
kernel-2.6.25.10-85.fc9.i686
kernel-2.6.25.11-93.fc9.i686

but even with this latest one that seems to correct a lot of problems with iwl*
it does not work.

I  attach my /var/log/wpa_supplicant.log with -dd enable as stated in comment #17.

Hope it will help to discover another fix to be added.

Thks,

Laurent

Comment 81 Laurent MINOST 2008-07-17 23:54:04 UTC
Created attachment 312090 [details]
wpa supplicant

Attachment for comment #80

Comment 82 Kevin Kofler 2008-07-18 00:30:51 UTC
The iwl* flakiness is a completely separate issue, a separate bug should be 
filed for it.

Comment 83 Joel Eidsath 2008-07-18 01:36:11 UTC
The iwl* flakiness was already filed as a separate bug, and was marked as a
duplicate to this issue. If you'd like, reopen bug 454036.

Comment 84 Stefan Becker 2008-07-18 04:21:34 UTC
(In reply to comment #81)
> Created an attachment (id=312090) [edit]
> wpa supplicant
> 
> Attachment for comment #80

Attachment #312090 [details] shows a totally different problem: the connection attempts
are aborted before the actual WPA TKIP key exchange is started. Please (re)open
another bug for this.


Comment 85 Thorsten Leemhuis 2008-07-21 12:27:34 UTC
Guys, just FYI: There is normally *no need* to remove yourself from the CClist
of a bug; it just creates noise for all the others that remain in the CC list. 

IOW: Nobody will receive any more mails from this bug as long
- as nobody adds more comments
- as nobody removes him or herself from the CC list

;-)

/me hopes the "Removed from CC list of bug 453390 spam" stops now