about summary refs log tree commit diff
path: root/debian
diff options
context:
space:
mode:
authorSebastien Bacher <seb128@ubuntu.com>2018-12-10 17:19:23 +0100
committerSebastien Bacher <seb128@ubuntu.com>2018-12-10 17:19:23 +0100
commit2a1859e7dff13b8e43b15e03aaddaea72445b5b9 (patch)
tree433503706f9523dd04fb71f5f3583263bc0b4bba /debian
parente2350feb0e9c7704d46bda478fc31e497de16ab6 (diff)
* debian/patches/git_mac_change.patch:
  - backported a regression fix from upstream git
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog2
-rw-r--r--debian/patches/git-mac-change.patch50
-rw-r--r--debian/patches/series1
3 files changed, 53 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 5f86f661..31f1ef5f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ network-manager (1.12.6-0ubuntu1) UNRELEASED; urgency=medium
 
   * New upstream version
     - Fix a vulnerability in the internal DHCPv6 client (CVE-2018-15688).
+  * debian/patches/git_mac_change.patch:
+    - backported a regression fix from upstream git
 
   [ Alfonso Sanchez-Beato ]
   * Import some WoWLAN patches from the newer stable serie (LP: #1781597)
diff --git a/debian/patches/git-mac-change.patch b/debian/patches/git-mac-change.patch
new file mode 100644
index 00000000..efa01d6d
--- /dev/null
+++ b/debian/patches/git-mac-change.patch
@@ -0,0 +1,50 @@
+From 0624814af17fb66826fda0e901c3d73a292ff37e Mon Sep 17 00:00:00 2001
+From: Beniamino Galvani <bgalvani@redhat.com>
+Date: Thu, 6 Dec 2018 16:56:47 +0100
+Subject: device: always take device down when changing MAC for wifi devices
+
+If the device is not taken down wpa_supplicant does not detect that
+the MAC changed and the authentication can fail due to wrong key
+derivation.
+
+Fixes: e206a3473249be4c92c5d71214a33e90db301127
+
+https://bugzilla.redhat.com/show_bug.cgi?id=1656157
+(cherry picked from commit 29e8f6d5a17c3dbfd11655338cd0ffc61e1fc91b)
+(cherry picked from commit b2686110ef9cfcd87470d65872abf4adb9dab37c)
+---
+ src/devices/nm-device.c | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
+index 76c80bd..3df5b28 100644
+--- a/src/devices/nm-device.c
++++ b/src/devices/nm-device.c
+@@ -14775,7 +14775,7 @@ _hw_addr_set (NMDevice *self,
+ 	NMPlatformError plerr;
+ 	guint8 addr_bytes[NM_UTILS_HWADDR_LEN_MAX];
+ 	gsize addr_len;
+-	gboolean was_taken_down;
++	gboolean was_taken_down = FALSE;
+ 	gboolean retry_down;
+ 
+ 	nm_assert (NM_IS_DEVICE (self));
+@@ -14799,7 +14799,14 @@ _hw_addr_set (NMDevice *self,
+ 
+ 	_LOGT (LOGD_DEVICE, "set-hw-addr: setting MAC address to '%s' (%s, %s)...", addr, operation, detail);
+ 
+-	was_taken_down = FALSE;
++	if (nm_device_get_device_type (self) == NM_DEVICE_TYPE_WIFI) {
++		/* Always take the device down for Wi-Fi because
++		 * wpa_supplicant needs it to properly detect the MAC
++		 * change. */
++		retry_down = FALSE;
++		was_taken_down = TRUE;
++		nm_device_take_down (self, FALSE);
++	}
+ 
+ again:
+ 	plerr = nm_platform_link_set_address (nm_device_get_platform (self), nm_device_get_ip_ifindex (self), addr_bytes, addr_len);
+-- 
+cgit v1.1
+
diff --git a/debian/patches/series b/debian/patches/series
index adf07cb8..85b43c21 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,3 +9,4 @@ libnm-Check-self-still-NMManager-or-not.patch
 #dns-manager-don-t-merge-split-DNS-search-domains.patch
 Read-system-connections-from-run.patch
 Import-some-missing-WoWLAN-patches.patch
+git-mac-change.patch