Skip to content

Commit 4dfe502

Browse files
committed
Merge branch '2.0' into fasttrack/2.0
2 parents 70c0172 + a313d25 commit 4dfe502

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+3101
-74
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
From 8275230bc42d69471c051475375af3bb9549ad9b Mon Sep 17 00:00:00 2001
2+
From: Werner Lemberg <wl@gnu.org>
3+
Date: Sat, 3 Jan 2026 08:07:57 +0100
4+
Subject: [PATCH] Check for overflow in array size computation.
5+
6+
Problem reported and analyzed by povcfe <povcfe2sec@gmail.com>.
7+
8+
Fixes issue #1382.
9+
10+
* src/truetype/ttgxvar.c (tt_var_load_item_variation_store): Do it.
11+
12+
Signed-off-by: Azure Linux Security Servicing Account <azurelinux-security@microsoft.com>
13+
Upstream-reference: https://gitlab.com/freetype/freetype/-/commit/fc85a255849229c024c8e65f536fe1875d84841c.patch
14+
---
15+
src/truetype/ttgxvar.c | 15 ++++++++++++++-
16+
1 file changed, 14 insertions(+), 1 deletion(-)
17+
18+
diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c
19+
index 8c713f1..d409793 100644
20+
--- a/src/truetype/ttgxvar.c
21+
+++ b/src/truetype/ttgxvar.c
22+
@@ -625,6 +625,7 @@
23+
FT_UInt word_delta_count;
24+
FT_UInt region_idx_count;
25+
FT_UInt per_region_size;
26+
+ FT_UInt delta_set_size;
27+
28+
29+
if ( FT_STREAM_SEEK( offset + dataOffsetArray[i] ) )
30+
@@ -682,7 +683,19 @@
31+
if ( long_words )
32+
per_region_size *= 2;
33+
34+
- if ( FT_NEW_ARRAY( varData->deltaSet, per_region_size * item_count ) )
35+
+ /* Check for overflow (we actually test whether the */
36+
+ /* multiplication of two unsigned values wraps around). */
37+
+ delta_set_size = per_region_size * item_count;
38+
+ if ( per_region_size &&
39+
+ delta_set_size / per_region_size != item_count )
40+
+ {
41+
+ FT_TRACE2(( "tt_var_load_item_variation_store:"
42+
+ " bad delta set array size\n" ));
43+
+ error = FT_THROW( Array_Too_Large );
44+
+ goto Exit;
45+
+ }
46+
+
47+
+ if ( FT_NEW_ARRAY( varData->deltaSet, delta_set_size ) )
48+
goto Exit;
49+
if ( FT_Stream_Read( stream,
50+
varData->deltaSet,
51+
--
52+
2.45.4
53+

SPECS/freetype/freetype.spec

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
Summary: software font engine.
22
Name: freetype
33
Version: 2.13.1
4-
Release: 1%{?dist}
4+
Release: 2%{?dist}
55
License: BSD/GPLv2
66
Vendor: Microsoft Corporation
77
Distribution: Mariner
88
Group: System Environment/Libraries
99
URL: https://www.freetype.org/
1010
Source0: https://download.savannah.gnu.org/releases/freetype/freetype-%{version}.tar.gz
1111
Source1: https://download.savannah.gnu.org/releases/freetype/freetype-doc-%{version}.tar.gz
12+
Patch0: CVE-2026-23865.patch
1213
BuildRequires: brotli-devel
1314
BuildRequires: bzip2-devel
1415
BuildRequires: gcc
@@ -58,7 +59,7 @@ find %{buildroot} -name '*.a' -delete
5859

5960
mkdir -p %{buildroot}%{_datadir}/licenses/freetype
6061
cp LICENSE.TXT %{buildroot}%{_datadir}/licenses/freetype
61-
cp -r docs/* %{buildroot}%{_datadir}/licenses/freetype
62+
cp docs/FTL.TXT docs/GPLv2.TXT %{buildroot}%{_datadir}/licenses/freetype
6263

6364
%check
6465
make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck}
@@ -68,18 +69,23 @@ make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck}
6869

6970
%files
7071
%defattr(-,root,root)
71-
%license docs/LICENSE.TXT
72+
%license LICENSE.TXT docs/FTL.TXT docs/GPLv2.TXT
7273
%{_libdir}/*.so*
73-
%{_datadir}/*
74+
%{_datadir}/licenses/freetype/
7475

7576
%files devel
7677
%defattr(-,root,root)
7778
%{_includedir}/*
7879
%{_libdir}/*.so
7980
%{_libdir}/pkgconfig/*.pc
8081
%{_bindir}/freetype-config
82+
%{_datadir}/aclocal/*
83+
%{_mandir}/man1/*
8184

8285
%changelog
86+
* Wed Mar 04 2026 Azure Linux Security Servicing Account <azurelinux-security@microsoft.com> - 2.13.1-2
87+
- Patch for CVE-2026-23865
88+
8389
* Wed Mar 12 2025 Kanishk Bansal <kanbansal@microsoft.com> - 2.13.1-1
8490
- Upgrade to 2.13.1 - for CVE-2025-27363
8591

SPECS/glib/CVE-2026-0988.patch

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
From 56ec31fed99ea19c123e5266a27f4ea03d25ae15 Mon Sep 17 00:00:00 2001
2+
From: Philip Withnall <pwithnall@gnome.org>
3+
Date: Thu, 18 Dec 2025 23:12:18 +0000
4+
Subject: [PATCH] gbufferedinputstream: Fix a potential integer overflow in
5+
peek()
6+
7+
If the caller provides `offset` and `count` arguments which overflow,
8+
their sum will overflow and could lead to `memcpy()` reading out more
9+
memory than expected.
10+
11+
Spotted by Codean Labs.
12+
13+
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
14+
15+
Fixes: #3851
16+
Signed-off-by: Azure Linux Security Servicing Account <azurelinux-security@microsoft.com>
17+
Upstream-reference: https://gitlab.gnome.org/GNOME/glib/-/commit/c5766cff61ffce0b8e787eae09908ac348338e5f.patch
18+
---
19+
gio/gbufferedinputstream.c | 2 +-
20+
gio/tests/buffered-input-stream.c | 10 ++++++++++
21+
2 files changed, 11 insertions(+), 1 deletion(-)
22+
23+
diff --git a/gio/gbufferedinputstream.c b/gio/gbufferedinputstream.c
24+
index d9f150d..04c4d9f 100644
25+
--- a/gio/gbufferedinputstream.c
26+
+++ b/gio/gbufferedinputstream.c
27+
@@ -588,7 +588,7 @@ g_buffered_input_stream_peek (GBufferedInputStream *stream,
28+
29+
available = g_buffered_input_stream_get_available (stream);
30+
31+
- if (offset > available)
32+
+ if (offset > available || offset > G_MAXSIZE - count)
33+
return 0;
34+
35+
end = MIN (offset + count, available);
36+
diff --git a/gio/tests/buffered-input-stream.c b/gio/tests/buffered-input-stream.c
37+
index ee084b3..39b4daf 100644
38+
--- a/gio/tests/buffered-input-stream.c
39+
+++ b/gio/tests/buffered-input-stream.c
40+
@@ -58,6 +58,16 @@ test_peek (void)
41+
g_assert_cmpint (npeek, ==, 0);
42+
g_free (buffer);
43+
44+
+ buffer = g_new0 (char, 64);
45+
+ npeek = g_buffered_input_stream_peek (G_BUFFERED_INPUT_STREAM (in), buffer, 8, 0);
46+
+ g_assert_cmpint (npeek, ==, 0);
47+
+ g_free (buffer);
48+
+
49+
+ buffer = g_new0 (char, 64);
50+
+ npeek = g_buffered_input_stream_peek (G_BUFFERED_INPUT_STREAM (in), buffer, 5, G_MAXSIZE);
51+
+ g_assert_cmpint (npeek, ==, 0);
52+
+ g_free (buffer);
53+
+
54+
g_object_unref (in);
55+
g_object_unref (base);
56+
}
57+
--
58+
2.45.4
59+

0 commit comments

Comments
 (0)