diff --git a/backport-CVE-2025-7519-Nested-.policy-files-cause-xml-parsing-overflow-lead.patch b/backport-CVE-2025-7519-Nested-.policy-files-cause-xml-parsing-overflow-lead.patch new file mode 100644 index 0000000000000000000000000000000000000000..fa04707f03614a4444dcf03daa4b5fa8ee6d4bfd --- /dev/null +++ b/backport-CVE-2025-7519-Nested-.policy-files-cause-xml-parsing-overflow-lead.patch @@ -0,0 +1,32 @@ +From 107d3801361b9f9084f78710178e683391f1d245 Mon Sep 17 00:00:00 2001 +From: Jan Rybar +Date: Fri, 6 Jun 2025 13:25:55 +0200 +Subject: [PATCH] Nested .policy files cause xml parsing overflow leading to + crash + +Reference:https://github.com/polkit-org/polkit/commit/107d3801361b9f9084f78710178e683391f1d245 +Conflict:NA + +--- + src/polkitbackend/polkitbackendactionpool.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/polkitbackend/polkitbackendactionpool.c b/src/polkitbackend/polkitbackendactionpool.c +index 43f89cb..f4acca9 100644 +--- a/src/polkitbackend/polkitbackendactionpool.c ++++ b/src/polkitbackend/polkitbackendactionpool.c +@@ -739,6 +739,12 @@ _start (void *data, const char *el, const char **attr) + guint num_attr; + ParserData *pd = data; + ++ if (pd->stack_depth < 0 || pd->stack_depth >= PARSER_MAX_DEPTH) ++ { ++ g_warning ("XML parsing reached max depth?"); ++ goto error; ++ } ++ + for (num_attr = 0; attr[num_attr] != NULL; num_attr++) + ; + +-- +2.33.0 \ No newline at end of file diff --git a/polkit.spec b/polkit.spec index 7a9432dd7859cdf472894f184ff78c7a8ee152d8..b263236514bdc660503d484991691c7ff88c622f 100644 --- a/polkit.spec +++ b/polkit.spec @@ -1,12 +1,13 @@ Name: polkit Version: 123 -Release: 1 +Release: 2 Summary: Define and Handle authorizations tool License: LGPLv2+ URL: http://www.freedesktop.org/wiki/Software/polkit Source0: https://gitlab.freedesktop.org/polkit/polkit/-/archive/%{version}/%{name}-%{version}.tar.gz Patch0: modify-admin-authorization-from-wheel-group-to-root.patch +Patch1: backport-CVE-2025-7519-Nested-.policy-files-cause-xml-parsing-overflow-lead.patch BuildRequires: gcc-c++ glib2-devel >= 2.30.0 expat-devel pam-devel gtk-doc gettext-devel BuildRequires: gobject-introspection-devel systemd systemd-devel dbus-devel @@ -122,6 +123,9 @@ exit 0 %{_datadir}/man/man8/* %changelog +* Fri Jul 18 2025 xuraoqing - 123-2 +- fix CVE-2025-7519 + * Tue Jan 30 2024 wangyu - 123-1 - update to 123 - duktape:prevent wrongful termination of runway thread