From 4504a04ad30d603698cb5496841032607b1aaf4e Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Fri, 20 Dec 2024 13:27:47 +0300 Subject: [PATCH] import ModemManager-1.22.0-7.el10 --- SOURCES/0001-mmcli-fix-a-memory-leak.patch | 25 +++++++++++ ...x-propagation-of-URAT-response-parse.patch | 43 +++++++++++++++++++ ...x-propagation-of-URAT-response-parse.patch | 38 ---------------- SPECS/ModemManager.spec | 12 +++++- 4 files changed, 78 insertions(+), 40 deletions(-) create mode 100644 SOURCES/0001-mmcli-fix-a-memory-leak.patch create mode 100644 SOURCES/0001-ublox-helpers-fix-propagation-of-URAT-response-parse.patch delete mode 100644 SOURCES/0002-ublox-helpers-fix-propagation-of-URAT-response-parse.patch diff --git a/SOURCES/0001-mmcli-fix-a-memory-leak.patch b/SOURCES/0001-mmcli-fix-a-memory-leak.patch new file mode 100644 index 0000000..cb9d110 --- /dev/null +++ b/SOURCES/0001-mmcli-fix-a-memory-leak.patch @@ -0,0 +1,25 @@ +From 509acb647462c5bd5c4b782076cb46a60dff9f07 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Sun, 7 Jul 2024 22:48:51 +0200 +Subject: [PATCH] mmcli: fix a memory leak + +Poor modem_uid got left behind. +--- + cli/mmcli-common.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/cli/mmcli-common.c b/cli/mmcli-common.c +index 404749321..11a7af9c4 100644 +--- a/cli/mmcli-common.c ++++ b/cli/mmcli-common.c +@@ -1045,6 +1045,7 @@ mmcli_get_sim_sync (GDBusConnection *connection, + } + + g_list_free_full (modems, g_object_unref); ++ g_free (modem_uid); + g_free (sim_path); + + if (o_manager) +-- +2.45.2 + diff --git a/SOURCES/0001-ublox-helpers-fix-propagation-of-URAT-response-parse.patch b/SOURCES/0001-ublox-helpers-fix-propagation-of-URAT-response-parse.patch new file mode 100644 index 0000000..1c5881c --- /dev/null +++ b/SOURCES/0001-ublox-helpers-fix-propagation-of-URAT-response-parse.patch @@ -0,0 +1,43 @@ +From 664d748a934bbb7ff295b4cf0dd3557b316d9c35 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Thu, 23 May 2024 14:45:22 +0200 +Subject: [PATCH] ublox/helpers: fix propagation of +URAT response parse error + +The fallback error handling branch happens much too late, just leaking the +newly made GError instead of propagating. +--- + src/plugins/ublox/mm-modem-helpers-ublox.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/plugins/ublox/mm-modem-helpers-ublox.c b/src/plugins/ublox/mm-modem-helpers-ublox.c +index 0fd1c5b0b..a494dd027 100644 +--- a/src/plugins/ublox/mm-modem-helpers-ublox.c ++++ b/src/plugins/ublox/mm-modem-helpers-ublox.c +@@ -1812,18 +1812,18 @@ mm_ublox_parse_urat_read_response (const gchar *response, + } + } + ++ if (!inner_error && allowed == MM_MODEM_MODE_NONE) { ++ inner_error = g_error_new (MM_CORE_ERROR, MM_CORE_ERROR_FAILED, ++ "Couldn't parse +URAT response: %s", response); ++ goto out; ++ } ++ + out: + if (inner_error) { + g_propagate_error (error, inner_error); + return FALSE; + } + +- if (allowed == MM_MODEM_MODE_NONE) { +- inner_error = g_error_new (MM_CORE_ERROR, MM_CORE_ERROR_FAILED, +- "Couldn't parse +URAT response: %s", response); +- return FALSE; +- } +- + *out_allowed = allowed; + *out_preferred = preferred; + return TRUE; +-- +2.45.2 + diff --git a/SOURCES/0002-ublox-helpers-fix-propagation-of-URAT-response-parse.patch b/SOURCES/0002-ublox-helpers-fix-propagation-of-URAT-response-parse.patch deleted file mode 100644 index 3bfe541..0000000 --- a/SOURCES/0002-ublox-helpers-fix-propagation-of-URAT-response-parse.patch +++ /dev/null @@ -1,38 +0,0 @@ -From d550a24ffdae4492e9f9e18fdf294adcda28fb65 Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -Date: Thu, 23 May 2024 14:45:22 +0200 -Subject: [PATCH 02/11] ublox/helpers: fix propagation of +URAT response parse - error - -We have been constructing a GError too late, just leaking it instead of -propagating. ---- - src/plugins/ublox/mm-modem-helpers-ublox.c | 9 ++++----- - 1 file changed, 4 insertions(+), 5 deletions(-) - -diff --git a/src/plugins/ublox/mm-modem-helpers-ublox.c b/src/plugins/ublox/mm-modem-helpers-ublox.c -index 0fd1c5b0b..ffb1374de 100644 ---- a/src/plugins/ublox/mm-modem-helpers-ublox.c -+++ b/src/plugins/ublox/mm-modem-helpers-ublox.c -@@ -1813,14 +1813,13 @@ mm_ublox_parse_urat_read_response (const gchar *response, - } - - out: -- if (inner_error) { -- g_propagate_error (error, inner_error); -- return FALSE; -- } -- - if (allowed == MM_MODEM_MODE_NONE) { - inner_error = g_error_new (MM_CORE_ERROR, MM_CORE_ERROR_FAILED, - "Couldn't parse +URAT response: %s", response); -+ } -+ -+ if (inner_error) { -+ g_propagate_error (error, inner_error); - return FALSE; - } - --- -2.45.2 - diff --git a/SPECS/ModemManager.spec b/SPECS/ModemManager.spec index ce6b66c..943d28d 100644 --- a/SPECS/ModemManager.spec +++ b/SPECS/ModemManager.spec @@ -5,7 +5,7 @@ Name: ModemManager Version: 1.22.0 -Release: 5%{?dist} +Release: 7%{?dist} Summary: Mobile broadband modem management service License: GPL-2.0-or-later URL: http://www.freedesktop.org/wiki/Software/ModemManager/ @@ -13,7 +13,7 @@ Source: https://gitlab.com/linux-mobile-broadband/ModemManager/-/archive/%{versi # All of these are applied upstream. Can frop on rebase to 1.24 Patch0: 0001-shared-qmi-do-not-leak-a-string-in-error-path.patch -Patch1: 0002-ublox-helpers-fix-propagation-of-URAT-response-parse.patch +Patch1: 0001-ublox-helpers-fix-propagation-of-URAT-response-parse.patch Patch2: 0003-broadband-modem-fix-a-potential-leak-in-cusd_process.patch Patch3: 0004-shared-qmi-fix-a-leak-in-error-handling-path.patch Patch4: 0005-quectel-shared-do-not-leak-name-string.patch @@ -23,6 +23,7 @@ Patch7: 0008-bearer-qmi-fix-a-copy-n-paste-error.patch Patch8: 0009-sim-qmi-do-not-leak-access-technology-name.patch Patch9: 0010-libmm-glib-signal-fix-a-copy-n-paste-error.patch Patch10: 0011-modem-helpers-do-not-leak-past-PDP-on-error.patch +Patch11: 0001-mmcli-fix-a-memory-leak.patch # For mbim-proxy and qmi-proxy Requires: libmbim-utils @@ -203,6 +204,13 @@ cp -a cli/mmcli-completion %{buildroot}%{_datadir}/bash-completion/completions/m %changelog +* Tue Oct 29 2024 Troy Dawson - 1.22.0-7 +- Bump release for October 2024 mass rebuild: + Resolves: RHEL-64018 + +* Wed Jul 10 2024 Lubomir Rintel - 1.22.0-6 +- Some more static analysis fixes (RHEL-38991) + * Tue Jun 25 2024 Lubomir Rintel - 1.22.0-5 - Add patches for a couple of bugs that make static analysis unhappy (RHEL-38991)