From b6ab28b63cca984c7445245923f4bb591236911b Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 10 Jul 2024 14:13:38 -0400 Subject: [PATCH] Stop looking for modules in cwd Resolves: RHEL-46993 --- 0001-Stop-looking-for-modules-in-cwd.patch | 35 ++++++++++++++++++++++ gtk3.spec | 8 ++++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 0001-Stop-looking-for-modules-in-cwd.patch diff --git a/0001-Stop-looking-for-modules-in-cwd.patch b/0001-Stop-looking-for-modules-in-cwd.patch new file mode 100644 index 0000000..a66beb6 --- /dev/null +++ b/0001-Stop-looking-for-modules-in-cwd.patch @@ -0,0 +1,35 @@ +From 3bbf0b6176d42836d23c36a6ac410e807ec0a7a7 Mon Sep 17 00:00:00 2001 +From: Matthias Clasen +Date: Sat, 15 Jun 2024 14:18:01 -0400 +Subject: [PATCH] Stop looking for modules in cwd + +This is just not a good idea. It is surprising, and can be misused. + +Fixes: #6786 +--- + gtk/gtkmodules.c | 9 ++------- + 1 file changed, 2 insertions(+), 7 deletions(-) + +diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c +index 704e412aeb..f93101c272 100644 +--- a/gtk/gtkmodules.c ++++ b/gtk/gtkmodules.c +@@ -214,13 +214,8 @@ find_module (const gchar *name) + gchar *module_name; + + module_name = _gtk_find_module (name, "modules"); +- if (!module_name) +- { +- /* As last resort, try loading without an absolute path (using system +- * library path) +- */ +- module_name = g_module_build_path (NULL, name); +- } ++ if (module_name == NULL) ++ return NULL; + + module = g_module_open (module_name, G_MODULE_BIND_LOCAL | G_MODULE_BIND_LAZY); + +-- +2.45.2 + diff --git a/gtk3.spec b/gtk3.spec index a3da634..7674906 100644 --- a/gtk3.spec +++ b/gtk3.spec @@ -19,7 +19,7 @@ Name: gtk3 Version: 3.24.31 -Release: 4%{?dist} +Release: 5%{?dist} Summary: GTK+ graphical user interface library License: LGPLv2+ @@ -37,6 +37,8 @@ Patch2: gtk3-3.24.31-meson-reftest.patch Patch3: gtk3-3.24.31-treeview-a11y-leak-fix.patch # https://issues.redhat.com/browse/RHEL-22483 Patch4: 0001-theme-Reduce-the-height-of-titlebars.patch +# https://issues.redhat.com/browse/RHEL-46993 +Patch5: 0001-Stop-looking-for-modules-in-cwd.patch BuildRequires: pkgconfig(atk) >= %{atk_version} BuildRequires: pkgconfig(atk-bridge-2.0) @@ -304,6 +306,10 @@ gtk-query-immodules-3.0-%{__isa_bits} --update-cache &>/dev/null || : %{_datadir}/installed-tests/ %changelog +* Wed Jul 10 2024 Matthias Clasen - 3.24.31-5 +- Stop looking for modules in cwd (CVE-2024-6655) +- Resolves: RHEL-46993 + * Wed May 15 2024 Matthias Clasen - 3.24.31-4 - Actually reduce the height of window titlebars