diff options
| author | Peter Marko <peter.marko@siemens.com> | 2025-08-24 21:08:02 +0200 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2025-09-01 08:30:56 -0700 |
| commit | 3a75849ff5645d28c85e2e6355bec6fdf287a5c1 (patch) | |
| tree | 5731b28d6a1ee7779e14b0a7e87a5c290c5558e6 | |
| parent | 3f6144ca201e81744bf8b5a13f1c7147a89d208b (diff) | |
| download | poky-3a75849ff5645d28c85e2e6355bec6fdf287a5c1.tar.gz | |
glib-2.0: patch CVE-2025-7039
Pick commit per [1].
[1] https://security-tracker.debian.org/tracker/CVE-2025-7039
(From OE-Core rev: 36402f219bc6fc03970e5277d449f2717199cf44)
Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
| -rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0/CVE-2025-7039.patch | 43 | ||||
| -rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0_2.78.6.bb | 1 |
2 files changed, 44 insertions, 0 deletions
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/CVE-2025-7039.patch b/meta/recipes-core/glib-2.0/glib-2.0/CVE-2025-7039.patch new file mode 100644 index 0000000000..6e03700880 --- /dev/null +++ b/meta/recipes-core/glib-2.0/glib-2.0/CVE-2025-7039.patch | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | From 61e963284889ddb4544e6f1d5261c16120f6fcc3 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Michael Catanzaro <mcatanzaro@redhat.com> | ||
| 3 | Date: Tue, 1 Jul 2025 10:58:07 -0500 | ||
| 4 | Subject: [PATCH] gfileutils: fix computation of temporary file name | ||
| 5 | |||
| 6 | We need to ensure that the value we use to index into the letters array | ||
| 7 | is always positive. | ||
| 8 | |||
| 9 | Fixes #3716 | ||
| 10 | |||
| 11 | CVE: CVE-2025-7039 | ||
| 12 | Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/61e963284889ddb4544e6f1d5261c16120f6fcc3] | ||
| 13 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
| 14 | --- | ||
| 15 | glib/gfileutils.c | 8 ++++---- | ||
| 16 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
| 17 | |||
| 18 | diff --git a/glib/gfileutils.c b/glib/gfileutils.c | ||
| 19 | index c7d3339d1..286b1b154 100644 | ||
| 20 | --- a/glib/gfileutils.c | ||
| 21 | +++ b/glib/gfileutils.c | ||
| 22 | @@ -1532,9 +1532,9 @@ get_tmp_file (gchar *tmpl, | ||
| 23 | static const char letters[] = | ||
| 24 | "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; | ||
| 25 | static const int NLETTERS = sizeof (letters) - 1; | ||
| 26 | - gint64 value; | ||
| 27 | - gint64 now_us; | ||
| 28 | - static int counter = 0; | ||
| 29 | + guint64 value; | ||
| 30 | + guint64 now_us; | ||
| 31 | + static guint counter = 0; | ||
| 32 | |||
| 33 | g_return_val_if_fail (tmpl != NULL, -1); | ||
| 34 | |||
| 35 | @@ -1553,7 +1553,7 @@ get_tmp_file (gchar *tmpl, | ||
| 36 | |||
| 37 | for (count = 0; count < 100; value += 7777, ++count) | ||
| 38 | { | ||
| 39 | - gint64 v = value; | ||
| 40 | + guint64 v = value; | ||
| 41 | |||
| 42 | /* Fill in the random bits. */ | ||
| 43 | XXXXXX[0] = letters[v % NLETTERS]; | ||
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.78.6.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.78.6.bb index 53e0543045..c129be1328 100644 --- a/meta/recipes-core/glib-2.0/glib-2.0_2.78.6.bb +++ b/meta/recipes-core/glib-2.0/glib-2.0_2.78.6.bb | |||
| @@ -29,6 +29,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \ | |||
| 29 | file://CVE-2025-3360-06.patch \ | 29 | file://CVE-2025-3360-06.patch \ |
| 30 | file://CVE-2025-4373-01.patch \ | 30 | file://CVE-2025-4373-01.patch \ |
| 31 | file://CVE-2025-4373-02.patch \ | 31 | file://CVE-2025-4373-02.patch \ |
| 32 | file://CVE-2025-7039.patch \ | ||
| 32 | " | 33 | " |
| 33 | SRC_URI:append:class-native = " file://relocate-modules.patch \ | 34 | SRC_URI:append:class-native = " file://relocate-modules.patch \ |
| 34 | file://0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch \ | 35 | file://0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch \ |
