From 73532ee75dcc309a21d13a2332769074b6d07fb5 Mon Sep 17 00:00:00 2001 From: Ondrej Holy Date: Thu, 24 Mar 2022 10:03:20 +0100 Subject: [PATCH] Fix DAV backend crashes caused by extra unref Resolves: #2066717 --- dav-Fix-crashes-caused-by-extra-unref.patch | 30 +++++++++++++++++++++ gvfs.spec | 8 +++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 dav-Fix-crashes-caused-by-extra-unref.patch diff --git a/dav-Fix-crashes-caused-by-extra-unref.patch b/dav-Fix-crashes-caused-by-extra-unref.patch new file mode 100644 index 0000000..158b008 --- /dev/null +++ b/dav-Fix-crashes-caused-by-extra-unref.patch @@ -0,0 +1,30 @@ +From 2b5e3453ee0ab504eeecb8dbe76015e98ccbfcfb Mon Sep 17 00:00:00 2001 +From: Ondrej Holy +Date: Wed, 23 Mar 2022 16:23:49 +0100 +Subject: [PATCH] dav: Fix crashes caused by extra unref + +The `mount_base` uri is unreffed twice. First time over the local `mount_base` +pointer and for the second time over the `G_VFS_BACKEND_HTTP (backend)->mount_base` +pointer. This leads to `SIGABRT` from the `__pthread_kill_implementation` +function. Let's remove that extra unref to fix this crashes. + +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2066717 +--- + daemon/gvfsbackenddav.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/daemon/gvfsbackenddav.c b/daemon/gvfsbackenddav.c +index 559b8657..f9d10a40 100644 +--- a/daemon/gvfsbackenddav.c ++++ b/daemon/gvfsbackenddav.c +@@ -2224,7 +2224,6 @@ do_mount (GVfsBackend *backend, + tmp = mount_base; + mount_base = dav_uri_dup_with (mount_base, last_good_path, NULL); + g_uri_unref (tmp); +- g_clear_pointer (&G_VFS_BACKEND_HTTP (backend)->mount_base, g_uri_unref); + G_VFS_BACKEND_HTTP (backend)->mount_base = mount_base; + g_free (last_good_path); + +-- +2.35.1 + diff --git a/gvfs.spec b/gvfs.spec index a34cfab..498902d 100644 --- a/gvfs.spec +++ b/gvfs.spec @@ -22,13 +22,16 @@ Name: gvfs Version: 1.50.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Backends for the gio framework in GLib License: GPLv3 and LGPLv2+ and BSD and MPLv2.0 URL: https://wiki.gnome.org/Projects/gvfs Source0: https://download.gnome.org/sources/gvfs/1.50/gvfs-%{version}.tar.xz +# https://bugzilla.redhat.com/show_bug.cgi?id=2066717 +Patch0: dav-Fix-crashes-caused-by-extra-unref.patch + BuildRequires: meson BuildRequires: gcc BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version} @@ -421,6 +424,9 @@ killall -USR1 gvfsd >&/dev/null || : %{_datadir}/installed-tests %changelog +* Thu Mar 24 2022 Ondrej Holy - 1.50.0-2 +- Fix DAV backend crashes caused by extra unref (#2066717) + * Fri Mar 18 2022 David King - 1.50.0-1 - Update to 1.50.0