Bug 1695696

Summary: Random Wifi MAC prevents authentication
Product: [Fedora] Fedora Reporter: Andrew Hunter <andrew>
Component: NetworkManagerAssignee: Lubomir Rintel <lkundrak>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 30CC: bgalvani, dcbw, fgiudici, gnome-sig, john.j5live, lkundrak, mclasen, rhughes, rstrode, sandmann, thaller
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-26 14:47:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Wifi log
none
Verbose Wifi logging
none
nmcli -f all device show wlp7s0 none

Description Andrew Hunter 2019-04-03 15:41:51 UTC
Created attachment 1551429 [details]
Wifi log

Description of problem:

Wifi nic will scan and list APs but not be able to connect to any of them. 

Solution:

Adding the following lines to /etc/NetworkManager/NetworkManager.conf

[device]
wifi.scan-rand-mac-address=no


Version-Release number of selected component (if applicable):

NetworkManager-1.16.0-1.fc30.x86_64


How reproducible: Every time for every wifi AP


Steps to Reproduce:
1. Update from F29
2. Attempt to connect to wifi AP

Actual results:

Failure

Expected results:

Sucess. 

Additional info:

$ journalctl -u wpa_supplicant.service -u NetworkManager | tail -n 250 > Wifi-issues.log 

$ lspci | grep Bro
07:00.0 Network controller: Broadcom Inc. and subsidiaries BCM43142 802.11b/g/n (rev 01)

$ lsmod | grep wl
wl                   6463488  0
cfg80211              794624  1 wl

Comment 1 Thomas Haller 2019-04-03 16:29:13 UTC
please enable level=TRACE logging of NetworkManager and provide debug logs of supplicant.


See https://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/contrib/fedora/rpm/NetworkManager.conf#n28 for how to get debug logs from NM. Please note the comment about ratelimiting done by journal and disable ratelimiting.

For debug logs from supplicant, you could edit the systemd unit file to pass "-ddd" to wpa_supplicant. See `systemctl cat wpa_supplicant.service`

thank you.

Comment 2 Andrew Hunter 2019-04-03 16:52:31 UTC
Created attachment 1551439 [details]
Verbose Wifi logging

Captures a fail-success-fail sequence.

Comment 3 Andrew Hunter 2019-04-03 16:54:05 UTC
Hi Thomas,

I've uploaded a more verbose log as you've indicated and managed to capture a fail-success-fail sequence that seemed to happen without any intervention on my part. 

At the time, I had not yet disabled rate limiting on the logging, I will continue to try to capture the sequence. 

Sincerely,
Andrew

Comment 4 Thomas Haller 2019-04-05 11:57:06 UTC
Thank you for the log. This is sufficent.

What gives `nmcli -f all device show wlp7s0` ?

Comment 5 Andrew Hunter 2019-04-05 13:13:35 UTC
Created attachment 1552516 [details]
nmcli -f all device show wlp7s0

This is with MAC Address Randomization set to NO, so my wifi functions.

Comment 6 Thomas Haller 2019-04-05 14:17:05 UTC
It seems "wl" driver behaves badly when the MAC address is changed.

We have an upstream example configuration file to disable wifi.scan-rand-mac-address for certain drivers [1].

[1] https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=78d9bd62ff152523489226b0bc7fd4f2b8ddc80d

We should probably also put this into Fedora.

Note that on Ubuntu 18.04, package "wpasupplicant" provides a file /usr/lib/NetworkManager/conf.d/no-mac-addr-change.conf with similar content to the upstream examples file. See the commit message in [1].


(this is of course a driver bug, but NM probably should install the snippet to disable setting the MAC address with "wl" driver).

Comment 7 Thomas Haller 2019-04-05 14:18:29 UTC
(In reply to andrew from comment #5)
> Created attachment 1552516 [details]
> nmcli -f all device show wlp7s0
> 
> This is with MAC Address Randomization set to NO, so my wifi functions.

Thanks for confirming.

I was interested that DRIVER.GENERAL indeed shows "wl".
This is independent from MAC Address Randomization.

Comment 9 Andrew Hunter 2019-04-05 15:11:42 UTC
Great! Thanks Thomas! From the stand point of an end user, this is a regression in the upgrade from F29 to F30. Will this be included in the final F30 release?

Comment 10 Thomas Haller 2019-04-05 15:23:00 UTC
(In reply to andrew from comment #9)
> Great! Thanks Thomas! From the stand point of an end user, this is a
> regression in the upgrade from F29 to F30. Will this be included in the
> final F30 release?

NetworkManager did not change regarding "wifi.scan-rand-mac-address" between F29 and F30.

That indicates that this problem was introduced in F30 by "wl" driver.

Comment 11 Thomas Haller 2019-04-05 15:27:22 UTC
(In reply to Thomas Haller from comment #10)
> (In reply to andrew from comment #9)
> > Great! Thanks Thomas! From the stand point of an end user, this is a
> > regression in the upgrade from F29 to F30. Will this be included in the
> > final F30 release?
> 
> NetworkManager did not change regarding "wifi.scan-rand-mac-address" between
> F29 and F30.
> 
> That indicates that this problem was introduced in F30 by "wl" driver.

but the answer is: "if (and only if) the patch passes review and gets merged upstream, then it can be added to Fedora quickly."

Comment 12 Lubomir Rintel 2019-04-08 07:29:10 UTC
(In reply to andrew from comment #0)
> $ lsmod | grep wl
> wl                   6463488  0
> cfg80211              794624  1 wl

This is not a Fedora driver. Please report the problem to whoever you got the driver from.

The best we can do is to provide a workaround for the broken driver -- which is what Thomas did.

(In reply to Thomas Haller from comment #11)
> but the answer is: "if (and only if) the patch passes review and gets merged
> upstream, then it can be added to Fedora quickly."

That may very well mean just "no."

I did comment on your PR, and I don't think the patch is good as it is. You're blacklisting drivers that shouldn't be on a blacklist.

That said, I'm fine with blacklisting just this one particular driver. It's an out-of-tree driver that is known to be beyond repair due to its maintenance model for years. One problem I have with this solution is that the problem is worked around silently, without an error or a warning logged.

Perhaps we should just hardcode this driver in code; or indicate the reason why we're blacklisting this driver:

[useless-crap]
match-device=driver:wl
warn-broken="Disabling all the useful things because the driver is known to be badly broken"
wifi.cloned-mac-address=preserve
ethernet.cloned-mac-address=preserve

Tbh neither seems like a particularly good idea to me and I'd just CANTFIX this bug.

Comment 13 Ben Cotton 2020-04-30 22:13:46 UTC
This message is a reminder that Fedora 30 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 30 on 2020-05-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '30'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 30 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 14 Ben Cotton 2020-05-26 14:47:31 UTC
Fedora 30 changed to end-of-life (EOL) status on 2020-05-26. Fedora 30 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.