From 59dabc3461cd10bc15e7e61dbe2df8f08874875c Mon Sep 17 00:00:00 2001 From: yanshuai01 Date: Wed, 16 Oct 2024 15:42:54 +0800 Subject: [PATCH] Fix GError use-after-free --- 0004-Fix-GError-use-after-free.patch | 26 ++++++++++++++++++++++++++ udisks2.spec | 6 +++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 0004-Fix-GError-use-after-free.patch diff --git a/0004-Fix-GError-use-after-free.patch b/0004-Fix-GError-use-after-free.patch new file mode 100644 index 0000000..65e232c --- /dev/null +++ b/0004-Fix-GError-use-after-free.patch @@ -0,0 +1,26 @@ +From d7ee82ec7f3eb817855e1e72667c317ef4760028 Mon Sep 17 00:00:00 2001 +From: yanshuai01 +Date: Wed, 16 Oct 2024 15:37:56 +0800 +Subject: [PATCH] Fix GError use-after-free + +--- + src/udiskslinuxloop.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/udiskslinuxloop.c b/src/udiskslinuxloop.c +index 5d7e355..91082b7 100644 +--- a/src/udiskslinuxloop.c ++++ b/src/udiskslinuxloop.c +@@ -274,8 +274,8 @@ handle_delete (UDisksLoop *loop, + if (!bd_loop_teardown (device_file, &error)) + { + g_prefix_error (&error, "Error deleting '%s': ", device_file); +- g_dbus_method_invocation_take_error (invocation, error); + udisks_simple_job_complete (UDISKS_SIMPLE_JOB (job), FALSE, error->message); ++ g_dbus_method_invocation_take_error (invocation, error); + goto out; + } + +-- +2.27.0 + diff --git a/udisks2.spec b/udisks2.spec index 98f3b1b..f2ee44e 100644 --- a/udisks2.spec +++ b/udisks2.spec @@ -58,7 +58,7 @@ Name: udisks2 Summary: Disk Manager Version: 2.9.4 -Release: 6 +Release: 7 License: GPL-2.0+ and LGPL-2.0+ Group: System Environment/Libraries URL: https://github.com/storaged-project/udisks @@ -66,6 +66,7 @@ Source0: https://github.com/storaged-project/udisks/releases/download/udisks-%{v Patch1: 0001-udiskslinuxmountoptions-Do-not-free-static-daemon-resources.patch Patch2: 0002-udisksctl-Guard-object-lookup.patch Patch3: 0003-udiskslinuxmanager-use-dbus-interface-after-free.patch +Patch4: 0004-Fix-GError-use-after-free.patch BuildRequires: glib2-devel >= %{glib2_version} BuildRequires: gobject-introspection-devel >= %{gobject_introspection_version} @@ -438,6 +439,9 @@ udevadm trigger %endif %changelog +* Wed Oct 16 2024 yanshuai - 2.9.4-7 +- udiskslinuxloop: Fix GError use-after-free + * Tue Jun 18 2024 cenhuilin - 2.9.4-6 - udiskslinuxmanager:use dbus interface after free -- Gitee