From 67ec5442e9745cd40d9c933f4418b8d25093f406 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 23 Oct 2018 12:13:11 +0200 Subject: [PATCH] device: fix crash in nm_device_generate_connection() (1:1.14.2-2) Also "dhcp: dhclient: fix memory leak". --- ...ash-in-nm_device_generate_connection.patch | 30 +++++++++++++++++++ 0002-dhcp-dhclient-fix-memory-leak.patch | 27 +++++++++++++++++ NetworkManager.spec | 8 ++++- 3 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 0001-device-fix-crash-in-nm_device_generate_connection.patch create mode 100644 0002-dhcp-dhclient-fix-memory-leak.patch diff --git a/0001-device-fix-crash-in-nm_device_generate_connection.patch b/0001-device-fix-crash-in-nm_device_generate_connection.patch new file mode 100644 index 0000000..d59a914 --- /dev/null +++ b/0001-device-fix-crash-in-nm_device_generate_connection.patch @@ -0,0 +1,30 @@ +From 76dc81c4cdeed20cd07c54ef1953284d7f029673 Mon Sep 17 00:00:00 2001 +From: Beniamino Galvani +Date: Thu, 27 Sep 2018 18:07:34 +0200 +Subject: [PATCH 1/1] device: fix crash in nm_device_generate_connection() + +Fixes: 89d1c9fb302e84b92d0be415f0bb4bdca34ae74c + +https://bugzilla.redhat.com/show_bug.cgi?id=1631741 +(cherry picked from commit f744e29dd368491adadf74976fc4d9e0bdbba32e) +(cherry picked from commit 3fc592219e106fdbf98e9e994a4531d9d045d0da) +--- + src/devices/nm-device.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c +index 26ea06bda..f2dbe6594 100644 +--- a/src/devices/nm-device.c ++++ b/src/devices/nm-device.c +@@ -5486,7 +5486,7 @@ nm_device_generate_connection (NMDevice *self, + + klass->update_connection (self, connection); + +- if (!nm_connection_normalize (connection, NULL, NULL, error)) { ++ if (!nm_connection_normalize (connection, NULL, NULL, &local)) { + g_set_error (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_FAILED, + "generated connection does not verify: %s", + local->message); +-- +2.17.1 + diff --git a/0002-dhcp-dhclient-fix-memory-leak.patch b/0002-dhcp-dhclient-fix-memory-leak.patch new file mode 100644 index 0000000..437fdd3 --- /dev/null +++ b/0002-dhcp-dhclient-fix-memory-leak.patch @@ -0,0 +1,27 @@ +From 7d89214747025d94a5686a761ce1f8ceef223100 Mon Sep 17 00:00:00 2001 +From: Beniamino Galvani +Date: Wed, 26 Sep 2018 15:14:58 +0200 +Subject: [PATCH 1/1] dhcp: dhclient: fix memory leak + +Fixes: c263f5355cbd86da75aaa161987fee8b59cb8c8b +(cherry picked from commit 0ba0f52cb74375a4a3b2a2f893f7b617510d80fd) +(cherry picked from commit 147081bd72c896b944059ac1538cf599b3b95632) +--- + src/dhcp/nm-dhcp-dhclient.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/dhcp/nm-dhcp-dhclient.c b/src/dhcp/nm-dhcp-dhclient.c +index 4a9361781..33c267123 100644 +--- a/src/dhcp/nm-dhcp-dhclient.c ++++ b/src/dhcp/nm-dhcp-dhclient.c +@@ -142,6 +142,7 @@ get_dhclient_leasefile (int addr_family, + iface); + + if (g_file_test (path, G_FILE_TEST_EXISTS)) { ++ g_free (rundir_path); + NM_SET_OUT (out_preferred_path, g_strdup (path)); + return path; + } +-- +2.17.1 + diff --git a/NetworkManager.spec b/NetworkManager.spec index 3541d8e..69043f3 100644 --- a/NetworkManager.spec +++ b/NetworkManager.spec @@ -10,7 +10,7 @@ %global epoch_version 1 %global rpm_version 1.14.2 %global real_version 1.14.2 -%global release_version 1 +%global release_version 2 %global snapshot %{nil} %global git_sha %{nil} @@ -111,6 +111,8 @@ Source3: 20-connectivity-fedora.conf Source4: 20-connectivity-redhat.conf #Patch1: 0001-some.patch +Patch1: 0001-device-fix-crash-in-nm_device_generate_connection.patch +Patch2: 0002-dhcp-dhclient-fix-memory-leak.patch Requires(post): systemd Requires(post): /usr/sbin/update-alternatives @@ -969,6 +971,10 @@ fi %changelog +* Tue Oct 23 2018 Thomas Haller - 1:1.14.2-2 +- device: fix crash in nm_device_generate_connection() +- dhcp: dhclient: fix memory leak + * Fri Oct 19 2018 Lubomir Rintel - 1:1.14.2-1 - Update to 1.14.2 release