public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Richard Hughes <rhughes@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/glib2] cve-2026-58016-f44: - Backport a patch from git master to avoid a segfault when doing the
Date: Tue, 11 Aug 2026 10:34:28 GMT [thread overview]
Message-ID: <178644446873.1.7230750388709594274.rpms-glib2-bf0da4ed34e9@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/glib2
Branch : cve-2026-58016-f44
Commit : bf0da4ed34e96d1666803007745377611977dba4
Author : Richard Hughes <rhughes@fedoraproject.org>
Date : 2010-06-22T08:54:41+00:00
Stats : +45/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/glib2/c/bf0da4ed34e96d1666803007745377611977dba4?branch=cve-2026-58016-f44
Log:
- Backport a patch from git master to avoid a segfault when doing the
schema file check for several GNOME projects.
---
diff --git a/0003-Fix-bug-in-strinfo.patch b/0003-Fix-bug-in-strinfo.patch
new file mode 100644
index 0000000..818c1f7
--- /dev/null
+++ b/0003-Fix-bug-in-strinfo.patch
@@ -0,0 +1,36 @@
+From a7689537605ade51b19be76baa3fba303527483d Mon Sep 17 00:00:00 2001
+From: Ryan Lortie <desrt@desrt.ca>
+Date: Sat, 19 Jun 2010 11:38:57 -0400
+Subject: [PATCH 03/45] Fix bug in strinfo
+
+We can't search for a larger needle inside of a smaller haystack, and
+unsigned integer subtraction tends to result in very large numbers
+rather than small ones.
+
+Add a check for this case and abort out immediately.
+
+Also add a test case (lifted directly from the docs) that demonstrates
+the problem.
+
+Issue discovered and tracked down by Milan Bouchet-Valat
+---
+ gio/strinfo.c | 3 ++
+ gio/tests/gschema-compile.c | 3 +-
+ gio/tests/schema-tests/from-docs.gschema.xml | 34 ++++++++++++++++++++++++++
+ 3 files changed, 39 insertions(+), 1 deletions(-)
+ create mode 100644 gio/tests/schema-tests/from-docs.gschema.xml
+
+diff --git a/gio/strinfo.c b/gio/strinfo.c
+index 9ba18aa..f762fc5 100644
+--- a/gio/strinfo.c
++++ b/gio/strinfo.c
+@@ -147,6 +147,9 @@ strinfo_scan (const guint32 *strinfo,
+ {
+ guint i = 0;
+
++ if (length < n_words)
++ return -1;
++
+ while (i <= length - n_words)
+ {
+ guint j = 0;
diff --git a/glib2.spec b/glib2.spec
index 0ccab1a..82ec04c 100644
--- a/glib2.spec
+++ b/glib2.spec
@@ -3,7 +3,7 @@
Summary: A library of handy utility functions
Name: glib2
Version: 2.25.9
-Release: 1%{?dist}
+Release: 2%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
URL: http://www.gtk.org
@@ -26,6 +26,9 @@ BuildRequires: gtk-doc
# required for GIO content-type support
Requires: shared-mime-info
+# already upstream
+Patch1: 0003-Fix-bug-in-strinfo.patch
+
%description
GLib is the low-level core library that forms the basis for projects
such as GTK+ and GNOME. It provides data structure handling for C,
@@ -52,6 +55,7 @@ The glib2-static package includes static libraries of the GLib library.
%prep
%setup -q -n glib-%{version}
+%patch1 -p1 -b .strinfo-bug
%build
%configure --disable-gtk-doc \
@@ -161,6 +165,10 @@ gio-querymodules-%{__isa_bits} %{_libdir}/gio/modules
%{_libdir}/lib*.a
%changelog
+* Tue Jun 22 2010 Richard Hughes <rhughes@redhat.com> - 2.25.9-2
+- Backport a patch from git master to avoid a segfault when doing the
+ schema file check for several GNOME projects.
+
* Fri Jun 18 2010 Matthias Clasen <mclasen@redhat.com> - 2.25.9-1
- Update to 2.25.9
reply other threads:[~2026-08-11 10:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178644446873.1.7230750388709594274.rpms-glib2-bf0da4ed34e9@fedoraproject.org \
--to=rhughes@fedoraproject.org \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox