diff --git a/SOURCES/polkit-0.112-EnumerateActions-leak.patch b/SOURCES/polkit-0.112-EnumerateActions-leak.patch new file mode 100644 index 0000000..e4c5b09 --- /dev/null +++ b/SOURCES/polkit-0.112-EnumerateActions-leak.patch @@ -0,0 +1,24 @@ +commit f4d71e0de885010494b8b0b8d62ca910011d7544 +Author: Max A. Dednev +Date: Sun Jan 11 20:00:44 2015 -0500 + + authority: Fix memory leak in EnumerateActions call results handler + + Policykit-1 doesn't release reference counters of GVariant data for + org.freedesktop.PolicyKit1.Authority.EnumerateActions dbus call. This + patch fixed reference counting and following memory leak. + + https://bugs.freedesktop.org/show_bug.cgi?id=88288 + +diff --git a/src/polkit/polkitauthority.c b/src/polkit/polkitauthority.c +index 75619ab..ab6d3cd 100644 +--- a/src/polkit/polkitauthority.c ++++ b/src/polkit/polkitauthority.c +@@ -715,7 +715,6 @@ polkit_authority_enumerate_actions_finish (PolkitAuthority *authority, + while ((child = g_variant_iter_next_value (&iter)) != NULL) + { + ret = g_list_prepend (ret, polkit_action_description_new_for_gvariant (child)); +- g_variant_ref_sink (child); + g_variant_unref (child); + } + ret = g_list_reverse (ret); diff --git a/SPECS/polkit.spec b/SPECS/polkit.spec index 27161dd..8f48eea 100644 --- a/SPECS/polkit.spec +++ b/SPECS/polkit.spec @@ -6,7 +6,7 @@ Summary: An authorization framework Name: polkit Version: 0.112 -Release: 6%{?dist} +Release: 7%{?dist} License: LGPLv2+ URL: http://www.freedesktop.org/wiki/Software/polkit Source0: http://www.freedesktop.org/software/polkit/releases/%{name}-%{version}.tar.gz @@ -17,6 +17,8 @@ Patch0: polkit-0.112-XDG_RUNTIME_DIR.patch Patch1: polkit-0.112-PolkitAgentSession-race.patch # https://bugs.freedesktop.org/show_bug.cgi?id=69501 Patch2: polkit-0.112-CVE-2015-3256.patch +# https://bugs.freedesktop.org/show_bug.cgi?id=88288 +Patch3: polkit-0.112-EnumerateActions-leak.patch Group: System Environment/Libraries BuildRequires: glib2-devel >= 2.30.0 BuildRequires: expat-devel @@ -86,6 +88,7 @@ Development documentation for polkit. %patch0 -p1 -b .XDG_RUNTIME_DIR %patch1 -p1 -b .PolkitAgentSession-race %patch2 -p1 -b .CVE-2015-3256 +%patch3 -p1 -b .EnumerateActions-leak %build %if 0%{?enable_autoreconf} @@ -174,6 +177,10 @@ fi %{_datadir}/gtk-doc %changelog +* Tue May 17 2016 Miloslav Trmač - 0.112-7 +- Fix a memory leak when processing the result of EnumerateActions + Resolves: #1310738 + * Mon Oct 19 2015 Miloslav Trmač - 0.112-6 - Fix CVE-2015-3256 Resolves: #1271790