diff --git a/0007-gui-wizard-gtk-Don-t-autofree-URL-string.patch b/0007-gui-wizard-gtk-Don-t-autofree-URL-string.patch new file mode 100644 index 0000000..b28d183 --- /dev/null +++ b/0007-gui-wizard-gtk-Don-t-autofree-URL-string.patch @@ -0,0 +1,34 @@ +From 9b6d40905c21b476c58e9f9a908ddb32a0a56a18 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Mat=C4=9Bj=20Grabovsk=C3=BD?= +Date: Tue, 29 Sep 2020 19:14:05 +0200 +Subject: [PATCH] gui-wizard-gtk: Don't autofree URL string + +g_object_set_data() does not (and cannot) copy the data passed to it, so +once url is freed, a subsequent access to the 'url' tag leads to an +invalid read and segfault. + +Bug was introduced in df386b097. + +Resolves rhbz#1882328 +--- + src/gui-wizard-gtk/wizard.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c +index 0af19587..ba1998df 100644 +--- a/src/gui-wizard-gtk/wizard.c ++++ b/src/gui-wizard-gtk/wizard.c +@@ -462,8 +462,8 @@ static void append_to_textview(GtkTextView *tv, const char *str) + GtkTextTag *tag; + tag = gtk_text_buffer_create_tag(tb, NULL, "foreground", "blue", + "underline", PANGO_UNDERLINE_SINGLE, NULL); +- g_autofree char *url = g_strndup(t->start, t->len); +- g_object_set_data(G_OBJECT(tag), "url", url); ++ char *url = g_strndup(t->start, t->len); ++ g_object_set_data_full(G_OBJECT(tag), "url", url, g_free); + + gtk_text_buffer_insert_with_tags(tb, &text_iter, url, -1, tag, NULL); + +-- +2.26.2 + diff --git a/libreport.spec b/libreport.spec index 27d2948..f17e39f 100644 --- a/libreport.spec +++ b/libreport.spec @@ -15,7 +15,7 @@ Summary: Generic library for reporting various problems Name: libreport Version: 2.14.0 -Release: 10%{?dist} +Release: 11%{?dist} License: GPLv2+ URL: https://abrt.readthedocs.org/ Source: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz @@ -26,6 +26,7 @@ Patch2: 0003-gui-wizard-gtk-Fix-a-double-free-condition.patch Patch3: 0004-gui-wizard-gtk-Fix-a-segfault-and-memory-leak.patch Patch4: 0005-gui-wizard-gtk-Fix-segfault.patch Patch5: 0006-event_config-Null-autofree-pointers-before-returning.patch +Patch6: 0007-gui-wizard-gtk-Don-t-autofree-URL-string.patch BuildRequires: %{dbus_devel} BuildRequires: gtk3-devel @@ -666,6 +667,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %endif %changelog +* Fri Oct 09 2020 Matěj Grabovský - 2.14.0-11 +- Add fix for https://bugzilla.redhat.com/show_bug.cgi?id=1882328 + * Tue Sep 29 2020 Matěj Grabovský - 2.14.0-10 - Add fix for https://bugzilla.redhat.com/show_bug.cgi?id=1883337 - Add fix for https://bugzilla.redhat.com/show_bug.cgi?id=1883410