import ModemManager-1.22.0-7.el10

cs10 imports/cs10/ModemManager-1.22.0-7.el10
MSVSphere Packaging Team 1 week ago
parent b49422118e
commit 4504a04ad3
Signed by: sys_gitsync
GPG Key ID: B2B0B9F29E528FE8

@ -0,0 +1,25 @@
From 509acb647462c5bd5c4b782076cb46a60dff9f07 Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak@v3.sk>
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

@ -0,0 +1,43 @@
From 664d748a934bbb7ff295b4cf0dd3557b316d9c35 Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak@v3.sk>
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

@ -1,38 +0,0 @@
From d550a24ffdae4492e9f9e18fdf294adcda28fb65 Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak@v3.sk>
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

@ -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 <tdawson@redhat.com> - 1.22.0-7
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Wed Jul 10 2024 Lubomir Rintel <lkundrak@v3.sk> - 1.22.0-6
- Some more static analysis fixes (RHEL-38991)
* Tue Jun 25 2024 Lubomir Rintel <lkundrak@v3.sk> - 1.22.0-5
- Add patches for a couple of bugs that make static analysis unhappy (RHEL-38991)

Loading…
Cancel
Save