From 2890d6210fbd7ad442a462dc7da45d4754064672 Mon Sep 17 00:00:00 2001 From: fandehui Date: Fri, 27 Oct 2023 19:16:23 +0800 Subject: [PATCH] service-action: Protect against unsent message use If the action wasn't sent, do not crash --- gupnp.spec | 7 +++- ...n-Protect-against-unsent-message-use.patch | 33 +++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 service-action-Protect-against-unsent-message-use.patch diff --git a/gupnp.spec b/gupnp.spec index 48342b3..b880715 100644 --- a/gupnp.spec +++ b/gupnp.spec @@ -1,6 +1,6 @@ Name: gupnp Version: 1.2.4 -Release: 3 +Release: 4 Summary: UPnP devices & control points creation framework License: LGPLv2+ URL: http://www.gupnp.org/ @@ -8,6 +8,7 @@ Source0: http://download.gnome.org/sources/%{name}/1.2/%{name}-%{version}. Patch0: CVE-2021-33516.patch Patch1: ServiceProxy-Remove-bogos-function-rename.patch Patch2: linux-cm-Fds-can-be-0.patch +Patch3: service-action-Protect-against-unsent-message-use.patch BuildRequires: gssdp-devel >= 1.2.3 gtk-doc gobject-introspection-devel >= 1.36 BuildRequires: libsoup-devel libxml2-devel libuuid-devel vala meson @@ -76,6 +77,10 @@ This package contains help file and developer documentation for gupnp. %{_mandir}/man1/gupnp-binding-tool-* %changelog +* Fri Nov 3 2023 fandehui - 1.2.4-4 +- service-action: Protect against unsent message use +- If the action wasn't sent, do not crash + * Thu Oct 26 2023 fandehui - 1.2.4-3 - linux-cm: Fds can be 0 diff --git a/service-action-Protect-against-unsent-message-use.patch b/service-action-Protect-against-unsent-message-use.patch new file mode 100644 index 0000000..b02e896 --- /dev/null +++ b/service-action-Protect-against-unsent-message-use.patch @@ -0,0 +1,33 @@ +From 8a349541f10b774ac8128bfb0e25ddbb405e6033 Mon Sep 17 00:00:00 2001 +From: Jens Georg +Date: Wed, 19 May 2021 19:40:41 +0200 +Subject: [PATCH] service-action: Protect against unsent message use + +If the action wasn't sent, do not crash +--- + libgupnp/gupnp-service-proxy-action.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/libgupnp/gupnp-service-proxy-action.c b/libgupnp/gupnp-service-proxy-action.c +index 3b3a7c1..2fd10d5 100644 +--- a/libgupnp/gupnp-service-proxy-action.c ++++ b/libgupnp/gupnp-service-proxy-action.c +@@ -61,6 +61,15 @@ check_action_response (G_GNUC_UNUSED GUPnPServiceProxy *proxy, + xmlDoc *response; + int code; + ++ if (action->msg == NULL) { ++ g_set_error (error, ++ GUPNP_SERVER_ERROR, ++ GUPNP_SERVER_ERROR_INVALID_RESPONSE, ++ "No message, the action was not sent?"); ++ ++ return NULL; ++ } ++ + /* Check for errors */ + switch (action->msg->status_code) { + case SOUP_STATUS_OK: +-- +2.27.0 +