Fix RTM NEW/DELLINK IFLA_IFNAME copy for maximum ifname length

Bug #1867908 reported by Alkis Georgopoulos
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
wpa (Debian)
Fix Released
Unknown
wpa (Ubuntu)
Fix Released
Medium
Unassigned
Focal
Fix Released
Medium
Unassigned

Bug Description

Some wifi adapters kept asking for a password when MAC address randomization was enabled.

I reported this to Realtek, and they gave me a patch for wpa_supplicant, which fixes the issue.

I asked Realtek to report this upstream to wpasupplicant, and they did, the commit is: http://w1.fi/cgit/hostap/commit/?id=7546c489a95a033c78331915fcdfa0e6fd74d563

It would be very nice to cherrypick that for Focal.

I uploaded it as a merge request below, and I tested that it fixes the issue with adapters based on the following chipsets:
ath9k, rtl8812au, rtl88x2bu and rtl8821cu

To reproduce this:

Ubuntu's network-manager defaults to "MAC randomization disabled", I think as a workaround to this specific issue. This is defined in two places:
- wifi.scan-rand-mac-address=no in /etc/NetworkManager/NetworkManager.conf
- Some specific drivers in /usr/lib/NetworkManager/conf.d/no-mac-addr-change.conf.

With these, the problem happens in around 10% of the cases.
To be able to reproduce it in 100% of the cases, it's best to remove these Ubuntu workarounds. So:
- Set "wifi.scan-rand-mac-address=yes" in /etc/NetworkManager/NetworkManager.conf
- Remove /usr/lib/NetworkManager/conf.d/no-mac-addr-change.conf.
- systemctl stop network-manager
- killall wpa_supplicant
- systemctl start network-manager

Then insert a USB wifi adapter that results in a big name with 15 characters like wlx74ee2ae2436a and try to connect to a wifi network. It will keep asking for a password.

Then apply the patch, run the 3 commands above to restart network-manager, and verify that it can now connect properly.

Tags: patch

Related branches

tags: added: patch
Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

The patch was merged upstream:
http://w1.fi/cgit/hostap/commit/?id=7546c489a95a033c78331915fcdfa0e6fd74d563

Could someone please cherrypick it to Focal? It's rather significant...

Will it help if I send a debdiff?

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

I uploaded this as a merge request and I tested the resulting package and I can confirm that it fixes the issue for adapters based on the following chipsets:
ath9k, rtl8812au, rtl88x2bu and rtl8821cu

description: updated
summary: - Patch for MAC randomization
+ Fix RTM NEW/DELLINK IFLA_IFNAME copy for maximum ifname length
description: updated
description: updated
Changed in wpasupplicant (Ubuntu):
status: New → Fix Committed
Revision history for this message
Robie Basak (racb) wrote :

Subscribing ~ubuntu-sponsors. Please see the attached MP.

Revision history for this message
Robie Basak (racb) wrote :

This is not treated as committed as it currently exists in Alkis' private branch only.

Changed in wpasupplicant (Ubuntu):
status: Fix Committed → Triaged
Revision history for this message
Andrej Shadura (andrew.sh) wrote :

@racb, it’s been committed to the upstream package in Debian; just a sync is needed.

affects: wpasupplicant (Ubuntu) → wpa (Ubuntu)
Revision history for this message
Andrej Shadura (andrew.sh) wrote :

Speaking of which, it would be great if this patch was dropped:

    - debian/patches/session-ticket.patch: disable the TLS Session Ticket
      extension to fix auth with 802.1x PEAP on some hardware.

This has been superseded by upstream changes a couple of releases ago and is no longer needed.

tags: added: champagne
Mathew Hodson (mhodson)
Changed in wpa (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

Hi all,

final freeze is approaching, and I don't see anyone syncing Andrej's new version from Debian...

Maybe it would be easier to just accept my patch, to have this solved for 20.04, and do the syncing for 20.10?

tags: removed: champagne
Changed in wpa (Ubuntu Focal):
status: Triaged → Fix Committed
Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

Thank you seb128! :)

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package wpa - 2:2.9-1ubuntu4

---------------
wpa (2:2.9-1ubuntu4) focal; urgency=medium

  * debian/patches/git_realtek_macrand.patch:
    - backport an upstream patch to fix issues with some realtek cards
      when MAC address randomization is enabled (lp: #1867908)

 -- Sebastien Bacher <email address hidden> Wed, 15 Apr 2020 10:08:07 +0200

Changed in wpa (Ubuntu Focal):
status: Fix Committed → Fix Released
Changed in wpa (Debian):
status: Unknown → New
Changed in wpa (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.