glib-2.0: Fix CVE-2026-0988
PATCH 1/1 glib-2.0: Fix CVE-2026-0988
From: Vijay Anusuri <[email protected]>
Upstream-Status: Backport from https://gitlab.gnome.org/GNOME/glib/-/commit/c5766cff61ffce0b8e787eae09908ac348338e5f
--- .../glib-2.0/glib-2.0/CVE-2026-0988.patch | 61 +++++++++++++++++++ meta/recipes-core/glib-2.0/glib-2.0_2.72.3.bb | 1 + 2 files changed, 62 insertions(+) create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2026-0988.patch
meta/recipes-core/glib-2.0/glib-2.0/CVE-2026-0988.patch new file +61 -0
@@ -0,0 +1,61 @@ +From c5766cff61ffce0b8e787eae09908ac348338e5f Mon Sep 17 00:00:00 2001 +From: Philip Withnall <[email protected]> +Date: Thu, 18 Dec 2025 23:12:18 +0000 +Subject: [PATCH] gbufferedinputstream: Fix a potential integer overflow in + peek() + +If the caller provides `offset` and `count` arguments which overflow, +their sum will overflow and could lead to `memcpy()` reading out more +memory than expected. + +Spotted by Codean Labs. + +Signed-off-by: Philip Withnall <[email protected]> + +Fixes: #3851 + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/c5766cff61ffce0b8e787eae09908ac348338e5f] +CVE: CVE-2026-0988 +Signed-off-by: Vijay Anusuri <[email protected]> +--- + gio/gbufferedinputstream.c | 2 +- + gio/tests/buffered-input-stream.c | 10 ++++++++++ + 2 files changed, 11 insertions(+), 1 deletion(-) + +diff --git a/gio/gbufferedinputstream.c b/gio/gbufferedinputstream.c +index 9e6bacc62d..56d656be04 100644 +--- a/gio/gbufferedinputstream.c ++++ b/gio/gbufferedinputstream.c +@@ -591,7 +591,7 @@ g_buffered_input_stream_peek (GBufferedInputStream *stream, + + available = g_buffered_input_stream_get_available (stream); + +- if (offset > available) ++ if (offset > available || offset > G_MAXSIZE - count) + return 0; + + end = MIN (offset + count, available); +diff --git a/gio/tests/buffered-input-stream.c b/gio/tests/buffered-input-stream.c +index a1af4eefff..2b2a0d9aa9 100644 +--- a/gio/tests/buffered-input-stream.c ++++ b/gio/tests/buffered-input-stream.c +@@ -60,6 +60,16 @@ test_peek (void) + g_assert_cmpint (npeek, ==, 0); + g_free (buffer); + ++ buffer = g_new0 (char, 64); ++ npeek = g_buffered_input_stream_peek (G_BUFFERED_INPUT_STREAM (in), buffer, 8, 0); ++ g_assert_cmpint (npeek, ==, 0); ++ g_free (buffer); ++ ++ buffer = g_new0 (char, 64); ++ npeek = g_buffered_input_stream_peek (G_BUFFERED_INPUT_STREAM (in), buffer, 5, G_MAXSIZE); ++ g_assert_cmpint (npeek, ==, 0); ++ g_free (buffer); ++ + g_object_unref (in); + g_object_unref (base); + } +-- +GitLab +
meta/recipes-core/glib-2.0/glib-2.0_2.72.3.bb +1 -0
@@ -70,6 +70,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ file://CVE-2025-14087-02.patch \ file://CVE-2025-14087-03.patch \ file://CVE-2025-14512.patch \ + file://CVE-2026-0988.patch \ " SRC_URI:append:class-native = " file://relocate-modules.patch"
Signature · 1 line
2.25.1
This is already submitted almost 4 weeks ago.
https://lists.openembedded.org/g/openembedded-core/message/229927
Since the nut branches are not updated that often nowadays, it's worth looking at the mailing list...
Peter
Quoted 109 lines
-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Vijay Anusuri via lists.openembedded.org
Sent: Wednesday, February 18, 2026 13:15
To: [email protected]
Cc: Vijay Anusuri <[email protected]>
Subject: [OE-core][kirkstone][PATCH] glib-2.0: Fix CVE-2026-0988From: Vijay Anusuri <[email protected]>
Upstream-Status: Backport from https://gitlab.gnome.org/GNOME/glib/-
/commit/c5766cff61ffce0b8e787eae09908ac348338e5fSigned-off-by Vijay Anusuri <[email protected]>--- .../glib-2.0/glib-2.0/CVE-2026-0988.patch | 61 +++++++++++++++++++ meta/recipes-core/glib-2.0/glib-2.0_2.72.3.bb | 1 + 2 files changed, 62 insertions(+) create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2026-0988.patchmeta/recipes-core/glib-2.0/glib-2.0/CVE-2026-0988.patch new file +17
-0@@ -0,0 +1,61 @@ +From c5766cff61ffce0b8e787eae09908ac348338e5f Mon Sep 17 00:00:00 2001 +From: Philip Withnall <[email protected]> +Date: Thu, 18 Dec 2025 23:12:18 +0000 +Subject: [PATCH] gbufferedinputstream: Fix a potential integer overflow in + peek() + +If the caller provides `offset` and `count` arguments which overflow, +their sum will overflow and could lead to `memcpy()` reading out more +memory than expected. + +Spotted by Codean Labs. + +Signed-off-by: Philip Withnall <[email protected]> + +Fixes: #3851 + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/c5766cff61ffce0b8e787eae09908ac348338e5f]
meta/recipes-core/glib-2.0/glib-2.0/CVE-2026-0988.patch new file +12
-0+CVE: CVE-2026-0988 +Signed-off-by: Vijay Anusuri <[email protected]> +--- + gio/gbufferedinputstream.c | 2 +- + gio/tests/buffered-input-stream.c | 10 ++++++++++ + 2 files changed, 11 insertions(+), 1 deletion(-) + +diff --git a/gio/gbufferedinputstream.c b/gio/gbufferedinputstream.c +index 9e6bacc62d..56d656be04 100644 +--- a/gio/gbufferedinputstream.c ++++ b/gio/gbufferedinputstream.c +@@ -591,7 +591,7 @@ g_buffered_input_stream_peek (GBufferedInputStream*stream,
meta/recipes-core/glib-2.0/glib-2.0/CVE-2026-0988.patch new file +18
-0+ + available = g_buffered_input_stream_get_available (stream); + +- if (offset > available) ++ if (offset > available || offset > G_MAXSIZE - count) + return 0; + + end = MIN (offset + count, available); +diff --git a/gio/tests/buffered-input-stream.c b/gio/tests/buffered-input-stream.c +index a1af4eefff..2b2a0d9aa9 100644 +--- a/gio/tests/buffered-input-stream.c ++++ b/gio/tests/buffered-input-stream.c +@@ -60,6 +60,16 @@ test_peek (void) + g_assert_cmpint (npeek, ==, 0); + g_free (buffer); + ++ buffer = g_new0 (char, 64); ++ npeek = g_buffered_input_stream_peek (G_BUFFERED_INPUT_STREAM(in), buffer, 8, 0);
++g_assert_cmpint(npeek, ==, 0);
++g_free(buffer);
++
++ buffer =g_new0(char, 64);
++ npeek =g_buffered_input_stream_peek(G_BUFFERED_INPUT_STREAM(in), buffer, 5,G_MAXSIZE);
++g_assert_cmpint(npeek, ==, 0);
++g_free(buffer);
++meta/recipes-core/glib-2.0/glib-2.0/CVE-2026-0988.patch new file +6
-0+ g_object_unref (in); + g_object_unref (base); + } +-- +GitLab +meta/recipes-core/glib- renamed from meta/recipes-core/glib-2.0/glib-2.0_2.72.3.bb +0
-02.0/glib-2.0_2.72.3.bb
index50701be3d0..7c0ed01f55100644meta/recipes-core/glib-2.0/glib-2.0_2.72.3.bb +1
-1@@ -70,6 +70,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib- ${PV}.tar.xz \ file://CVE-2025-14087-02.patch \ file://CVE-2025-14087-03.patch \ file://CVE-2025-14512.patch \ + file://CVE-2026-0988.patch \ " SRC_URI:append:class-native = " file://relocate-modules.patch" --2.25.1
Hi Peter,
Thanks for pointing that out.
I missed the earlier submission on the OpenEmbedded Core — sorry about that. I’ll follow-up the thread there.
Thanks for the clarification.
Yoann,
Please ignore this patch.
Thanks & Regards,
Vijay
Quoted 133 lines · Peter Marko via lists.openembedded.org
This is already submitted almost 4 weeks ago.
https://lists.openembedded.org/g/openembedded-core/message/229927
Since the nut branches are not updated that often nowadays, it's worth looking at the mailing list...Peter
Quoted 14 lines
-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Vijay Anusuri via lists.openembedded.org
Sent: Wednesday, February 18, 2026 13:15
To: [email protected]
Cc: Vijay Anusuri <[email protected]>
Subject: [OE-core][kirkstone][PATCH] glib-2.0: Fix CVE-2026-0988From: Vijay Anusuri <[email protected]>
Upstream-Status: Backport from https://gitlab.gnome.org/GNOME/glib/-
/commit/c5766cff61ffce0b8e787eae09908ac348338e5fQuoted 6 lines
Signed-off-by Vijay Anusuri <[email protected]>--- .../glib-2.0/glib-2.0/CVE-2026-0988.patch | 61 +++++++++++++++++++ meta/recipes-core/glib-2.0/glib-2.0_2.72.3.bb | 1 + 2 files changed, 62 insertions(+) create mode 100644
meta/recipes-core/glib-2.0/glib-2.0/CVE-2026-0988.patchmeta/recipes-core/glib-2.0/glib-2.0/CVE-2026-0988.patch line 4
Quoted 12 lines
meta/recipes-core/glib-2.0/glib-2.0/CVE-2026-0988.patch new file +4
-0@@ -0,0 +1,61 @@ +From c5766cff61ffce0b8e787eae09908ac348338e5f Mon Sep 17 00:00:00 2001 +From: Philip Withnall <[email protected]> +Date: Thu, 18 Dec 2025 23:12:18 +0000 +Subject: [PATCH] gbufferedinputstream: Fix a potential integer overflowin
Quoted 27 lines
meta/recipes-core/glib-2.0/glib-2.0/CVE-2026-0988.patch new file +13
-0+ peek() + +If the caller provides `offset` and `count` arguments which overflow, +their sum will overflow and could lead to `memcpy()` reading out more +memory than expected. + +Spotted by Codean Labs. + +Signed-off-by: Philip Withnall <[email protected]> + +Fixes: #3851 + +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/c5766cff61ffce0b8e787eae09908ac348338e5f]
meta/recipes-core/glib-2.0/glib-2.0/CVE-2026-0988.patch new file +12
-0+CVE: CVE-2026-0988 +Signed-off-by: Vijay Anusuri <[email protected]> +--- + gio/gbufferedinputstream.c | 2 +- + gio/tests/buffered-input-stream.c | 10 ++++++++++ + 2 files changed, 11 insertions(+), 1 deletion(-) + +diff --git a/gio/gbufferedinputstream.c b/gio/gbufferedinputstream.c +index 9e6bacc62d..56d656be04 100644 +--- a/gio/gbufferedinputstream.c ++++ b/gio/gbufferedinputstream.c +@@ -591,7 +591,7 @@ g_buffered_input_stream_peek (GBufferedInputStream*stream,
meta/recipes-core/glib-2.0/glib-2.0/CVE-2026-0988.patch
Quoted 9 lines
meta/recipes-core/glib-2.0/glib-2.0/CVE-2026-0988.patch new file +9
-0+ + available = g_buffered_input_stream_get_available (stream); + +- if (offset > available) ++ if (offset > available || offset > G_MAXSIZE - count) + return 0; + + end = MIN (offset + count, available); +diff --git a/gio/tests/buffered-input-stream.c
b/gio/tests/buffered-input-stream.cReview
Quoted 26 lines
meta/recipes-core/glib-2.0/glib-2.0/CVE-2026-0988.patch new file +9
-0+index a1af4eefff..2b2a0d9aa9 100644 +--- a/gio/tests/buffered-input-stream.c ++++ b/gio/tests/buffered-input-stream.c +@@ -60,6 +60,16 @@ test_peek (void) + g_assert_cmpint (npeek, ==, 0); + g_free (buffer); + ++ buffer = g_new0 (char, 64); ++ npeek = g_buffered_input_stream_peek (G_BUFFERED_INPUT_STREAM(in), buffer, 8, 0);
++g_assert_cmpint(npeek, ==, 0);
++g_free(buffer);
++
++ buffer =g_new0(char, 64);
++ npeek =g_buffered_input_stream_peek(G_BUFFERED_INPUT_STREAM(in), buffer, 5,G_MAXSIZE);
++g_assert_cmpint(npeek, ==, 0);
++g_free(buffer);
++meta/recipes-core/glib-2.0/glib-2.0/CVE-2026-0988.patch new file +6
-0+ g_object_unref (in); + g_object_unref (base); + } +-- +GitLab +(quoted diff) +0
-0b/meta/recipes-core/glib-
Quoted 14 lines
2.0/glib-2.0_2.72.3.bb
index50701be3d0..7c0ed01f55100644meta/recipes-core/glib-2.0/glib-2.0_2.72.3.bb +1
-1@@ -70,6 +70,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib- ${PV}.tar.xz \ file://CVE-2025-14087-02.patch \ file://CVE-2025-14087-03.patch \ file://CVE-2025-14512.patch \ + file://CVE-2026-0988.patch \ " SRC_URI:append:class-native = " file://relocate-modules.patch" --Quoted 1 line
2.25.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#231297):
https://lists.openembedded.org/g/openembedded-core/message/231297
Mute This Topic: https://lists.openembedded.org/mt/117873357/7301997
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-