about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSebastien Bacher <seb128@ubuntu.com>2021-07-05 20:40:28 +0200
committerSebastien Bacher <seb128@ubuntu.com>2021-07-05 20:40:28 +0200
commit4c4f7172f21af84dbbe50cf1bddfc160e33aec28 (patch)
tree2bd8fb30faa9d33f7dc6a4d242fd994bc14c1551
parent5d67593e4f1329fc32a36adc5dbc445e7c606bd1 (diff)
Update packaging for the new version
-rw-r--r--debian/changelog10
-rw-r--r--debian/patches/CVE-2021-20297.patch72
-rw-r--r--debian/patches/Force-online-state-with-unmanaged-devices.patch26
-rw-r--r--debian/patches/Update-dnsmasq-parameters.patch2
-rw-r--r--debian/patches/series4
-rw-r--r--debian/patches/ubuntu_revert_systemd.patch48
6 files changed, 26 insertions, 136 deletions
diff --git a/debian/changelog b/debian/changelog
index 31ddee84..40857e95 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+network-manager (1.32.2-0ubuntu1) UNRELEASED; urgency=medium
+
+  * New upstream version
+  * debian/patches/ubuntu_revert_systemd.patch:
+    - remove, the issue was fixed in systemd
+  * debian/patches/CVE-2021-20297.patch:
+    - remove, the fix is in the new version
+
+ -- Sebastien Bacher <seb128@ubuntu.com>  Mon, 05 Jul 2021 20:36:31 +0200
+
 network-manager (1.30.0-1ubuntu4) impish; urgency=medium
 
   * d/t/nm.py: adapt to changes dnsmasq behavior (LP: #1894619)
diff --git a/debian/patches/CVE-2021-20297.patch b/debian/patches/CVE-2021-20297.patch
deleted file mode 100644
index e9b9dd12..00000000
--- a/debian/patches/CVE-2021-20297.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 420784e342da4883f6debdfe10cde68507b10d27 Mon Sep 17 00:00:00 2001
-From: Thomas Haller <thaller@redhat.com>
-Date: Wed, 24 Mar 2021 21:05:19 +0100
-Subject: [PATCH] core: fix crash in nm_wildcard_match_check()
-
-It's not entirely clear how to treat %NULL.
-Clearly "match.interface-name=eth0" should not
-match with an interface %NULL. But what about
-"match.interface-name=!eth0"? It's now implemented
-that negative matches still succeed against %NULL.
-What about "match.interface-name=*"? That probably
-should also match with %NULL. So we treat %NULL really
-like "".
-
-Against commit 11cd443448bc ('iwd: Don't call IWD methods when device
-unmanaged'), we got this backtrace:
-
-    #0  0x00007f1c164069f1 in __strnlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:62
-    #1  0x00007f1c1637ac9e in __fnmatch (pattern=<optimized out>, string=<optimized out>, string@entry=0x0, flags=flags@entry=0) at fnmatch.c:379
-            p = 0x0
-            res = <optimized out>
-            orig_pattern = <optimized out>
-            n = <optimized out>
-            wpattern = 0x7fff8d860730 L"pci-0000:03:00.0"
-            ps = {__count = 0, __value = {__wch = 0, __wchb = "\000\000\000"}}
-            wpattern_malloc = 0x0
-            wstring_malloc = 0x0
-            wstring = <optimized out>
-            alloca_used = 80
-            __PRETTY_FUNCTION__ = "__fnmatch"
-    #2  0x0000564484a978bf in nm_wildcard_match_check (str=0x0, patterns=<optimized out>, num_patterns=<optimized out>) at src/core/nm-core-utils.c:1959
-            is_inverted = 0
-            is_mandatory = 0
-            match = <optimized out>
-            p = 0x564486c43fa0 "pci-0000:03:00.0"
-            has_optional = 0
-            has_any_optional = 0
-            i = <optimized out>
-    #3  0x0000564484bf4797 in check_connection_compatible (self=<optimized out>, connection=<optimized out>, error=0x0) at src/core/devices/nm-device.c:7499
-            patterns = <optimized out>
-            device_driver = 0x564486c76bd0 "veth"
-            num_patterns = 1
-            priv = 0x564486cbe0b0
-            __func__ = "check_connection_compatible"
-            device_iface = <optimized out>
-            local = 0x564486c99a60
-            conn_iface = 0x0
-            klass = <optimized out>
-            s_match = 0x564486c63df0 [NMSettingMatch]
-    #4  0x0000564484c38491 in check_connection_compatible (device=0x564486cbe590 [NMDeviceVeth], connection=0x564486c6b160, error=0x0) at src/core/devices/nm-device-ethernet.c:348
-            self = 0x564486cbe590 [NMDeviceVeth]
-            s_wired = <optimized out>
-
-Fixes: 3ced486f4162 ('libnm/match: extend syntax for match patterns with '|', '&', '!' and '\\'')
-
-https://bugzilla.redhat.com/show_bug.cgi?id=1942741
----
- src/core/nm-core-utils.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
---- a/src/core/nm-core-utils.c
-+++ b/src/core/nm-core-utils.c
-@@ -1956,7 +1956,8 @@ nm_wildcard_match_check(const char *str,
- 
-         _pattern_parse(patterns[i], &p, &is_inverted, &is_mandatory);
- 
--        match = (fnmatch(p, str, 0) == 0);
-+        match = (fnmatch(p, str ?: "", 0) == 0);
-+
-         if (is_inverted)
-             match = !match;
- 
diff --git a/debian/patches/Force-online-state-with-unmanaged-devices.patch b/debian/patches/Force-online-state-with-unmanaged-devices.patch
index a639e11a..2af94a6f 100644
--- a/debian/patches/Force-online-state-with-unmanaged-devices.patch
+++ b/debian/patches/Force-online-state-with-unmanaged-devices.patch
@@ -11,10 +11,10 @@ Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=512286
  src/core/nm-manager.c | 115 ++++++++++++++++++++++++++++++++++++++++++++++++++
  1 file changed, 115 insertions(+)
 
-diff --git a/src/core/nm-manager.c b/src/core/nm-manager.c
-index 5a6e05a..4c56b77 100644
---- a/src/core/nm-manager.c
-+++ b/src/core/nm-manager.c
+Index: network-manager/src/core/nm-manager.c
+===================================================================
+--- network-manager.orig/src/core/nm-manager.c
++++ network-manager/src/core/nm-manager.c
 @@ -52,6 +52,8 @@
  
  #define DEVICE_STATE_PRUNE_RATELIMIT_MAX 100u
@@ -35,7 +35,7 @@ index 5a6e05a..4c56b77 100644
      guint timestamp_update_id;
  
      guint devices_inited_id;
-@@ -1463,6 +1469,27 @@ find_best_device_state(NMManager *manager)
+@@ -1471,6 +1477,27 @@ find_best_device_state(NMManager *manage
      return best_state;
  }
  
@@ -63,7 +63,7 @@ index 5a6e05a..4c56b77 100644
  static void
  nm_manager_update_metered(NMManager *self)
  {
-@@ -1509,6 +1536,9 @@ nm_manager_update_state(NMManager *self)
+@@ -1517,6 +1544,9 @@ nm_manager_update_state(NMManager *self)
      else
          new_state = find_best_device_state(self);
  
@@ -73,11 +73,10 @@ index 5a6e05a..4c56b77 100644
      if (new_state >= NM_STATE_CONNECTED_LOCAL && priv->connectivity_state == NM_CONNECTIVITY_FULL) {
          new_state = NM_STATE_CONNECTED_GLOBAL;
      }
-@@ -6603,6 +6633,62 @@ impl_manager_set_logging(NMDBusObject *                     obj,
-         g_dbus_method_invocation_return_value(invocation, NULL);
+@@ -6647,6 +6677,62 @@ impl_manager_set_logging(NMDBusObject *
  }
  
-+static void
+ static void
 +check_ifstate_file(gpointer user_data)
 +{
 +    NMManager        *self   = NM_MANAGER(user_data);
@@ -133,10 +132,11 @@ index 5a6e05a..4c56b77 100644
 +    }
 +}
 +
- static void
++static void
  impl_manager_get_logging(NMDBusObject *                     obj,
                           const NMDBusInterfaceInfoExtended *interface_info,
-@@ -6932,6 +7018,9 @@ nm_manager_start(NMManager *self, GError **error)
+                          const NMDBusMethodInfoExtended *   method_info,
+@@ -6969,6 +7055,9 @@ nm_manager_start(NMManager *self, GError
      nm_clear_g_source(&priv->devices_inited_id);
      priv->devices_inited_id = g_idle_add_full(G_PRIORITY_LOW + 10, devices_inited_cb, self, NULL);
  
@@ -146,7 +146,7 @@ index 5a6e05a..4c56b77 100644
      return TRUE;
  }
  
-@@ -7826,6 +7915,22 @@ nm_manager_init(NMManager *self)
+@@ -7949,6 +8038,22 @@ nm_manager_init(NMManager *self)
          _LOGW(LOGD_CORE, "failed to monitor kernel firmware directory '%s'.", KERNEL_FIRMWARE_DIR);
      }
  
@@ -169,7 +169,7 @@ index 5a6e05a..4c56b77 100644
      /* Update timestamps in active connections */
      priv->timestamp_update_id =
          g_timeout_add_seconds(300,
-@@ -8111,6 +8216,16 @@ dispose(GObject *object)
+@@ -8232,6 +8337,16 @@ dispose(GObject *object)
          g_clear_object(&priv->fw_monitor);
      }
  
diff --git a/debian/patches/Update-dnsmasq-parameters.patch b/debian/patches/Update-dnsmasq-parameters.patch
index be5ecc08..cf13dac3 100644
--- a/debian/patches/Update-dnsmasq-parameters.patch
+++ b/debian/patches/Update-dnsmasq-parameters.patch
@@ -44,7 +44,7 @@ Index: network-manager/src/core/dns/nm-dns-manager.c
          gboolean    need_edns0;
          gboolean    need_trust;
  
-@@ -2031,7 +2031,7 @@ nm_dns_manager_stop(NMDnsManager *self)
+@@ -2012,7 +2012,7 @@ nm_dns_manager_stop(NMDnsManager *self)
      _LOGT("stopping...");
  
      /* If we're quitting, leave a valid resolv.conf in place, not one
diff --git a/debian/patches/series b/debian/patches/series
index 395557e9..c25f5936 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,6 +1,6 @@
 Force-online-state-with-unmanaged-devices.patch
+
 # Ubuntu patches
 Provide-access-to-some-of-NM-s-interfaces-to-whoopsie.patch
 Update-dnsmasq-parameters.patch
-ubuntu_revert_systemd.patch
-CVE-2021-20297.patch
+
diff --git a/debian/patches/ubuntu_revert_systemd.patch b/debian/patches/ubuntu_revert_systemd.patch
deleted file mode 100644
index 2f5740cd..00000000
--- a/debian/patches/ubuntu_revert_systemd.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-Index: network-manager/src/core/platform/nm-linux-platform.c
-===================================================================
---- network-manager.orig/src/core/platform/nm-linux-platform.c
-+++ network-manager/src/core/platform/nm-linux-platform.c
-@@ -29,7 +29,6 @@
- #include <poll.h>
- #include <sys/ioctl.h>
- #include <sys/socket.h>
--#include <sys/statvfs.h>
- #include <unistd.h>
- 
- #include "nm-std-aux/unaligned.h"
-@@ -9515,34 +9514,12 @@ constructed(GObject *_object)
-     }
- }
- 
--/* Similar to systemd's path_is_read_only_fs(), at
-- * https://github.com/systemd/systemd/blob/v246/src/basic/stat-util.c#L132 */
--static int
--path_is_read_only_fs(const char *path)
--{
--    struct statvfs st;
--
--    if (statvfs(path, &st) < 0)
--        return -errno;
--
--    if (st.f_flag & ST_RDONLY)
--        return TRUE;
--
--    /* On NFS, statvfs() might not reflect whether we can actually
--	 * write to the remote share. Let's try again with
--	 * access(W_OK) which is more reliable, at least sometimes. */
--    if (access(path, W_OK) < 0 && errno == EROFS)
--        return TRUE;
--
--    return FALSE;
--}
--
- NMPlatform *
- nm_linux_platform_new(gboolean log_with_ptr, gboolean netns_support)
- {
-     gboolean use_udev = FALSE;
- 
--    if (nmp_netns_is_initial() && path_is_read_only_fs("/sys") == FALSE)
-+    if (nmp_netns_is_initial() && access("/sys", W_OK) == 0)
-         use_udev = TRUE;
- 
-     return g_object_new(NM_TYPE_LINUX_PLATFORM,