Patch review
cover Patch review
Please review this set of changes for kirkstone and hjave comments back by end of day Tuesday, June 25
Passed a-full on autobuilder:
https://autobuilder.yoctoproject.org/typhoon/#/builders/83/builds/7065
The following changes since commit ab2649ef6c83f0ae7cac554a72e6bea4dcda0e99:
build-appliance-image: Update to kirkstone head revision (2024-06-01 19:12:27 -0700)
are available in the Git repository at:
https://git.openembedded.org/openembedded-core-contrib stable/kirkstone-nut
https://git.openembedded.org/openembedded-core-contrib/log/?h=stable/kirkstone-nut
Changqing Li (1):
man-pages: remove conflict pages
Deepthi Hemraj (1):
glibc: stable 2.35 branch updates
Khem Raj (1):
gobject-introspection: Do not hardcode objdump name
Peter Marko (1):
glib-2.0: patch CVE-2024-34397
Siddharth (1):
openssl: Upgrade 3.0.13 -> 3.0.14
Siddharth Doshi (1):
libxml2: Security fix for CVE-2024-34459
Thomas Perrot (1):
man-pages: add an alternative link name for crypt_r.3
Yogita Urade (2):
acpica: fix CVE-2024-24856
ruby: fix CVE-2024-27280
.../openssl/openssl/CVE-2024-2511.patch | 122 ---
.../openssl/openssl/CVE-2024-4603.patch | 180 ----
.../{openssl_3.0.13.bb => openssl_3.0.14.bb} | 4 +-
.../glib-2.0/glib-2.0/CVE-2024-34397_01.patch | 129 +++
.../glib-2.0/glib-2.0/CVE-2024-34397_02.patch | 62 ++
.../glib-2.0/glib-2.0/CVE-2024-34397_03.patch | 985 ++++++++++++++++++
.../glib-2.0/glib-2.0/CVE-2024-34397_04.patch | 253 +++++
.../glib-2.0/glib-2.0/CVE-2024-34397_05.patch | 88 ++
.../glib-2.0/glib-2.0/CVE-2024-34397_06.patch | 263 +++++
.../glib-2.0/glib-2.0/CVE-2024-34397_07.patch | 45 +
.../glib-2.0/glib-2.0/CVE-2024-34397_08.patch | 168 +++
.../glib-2.0/glib-2.0/CVE-2024-34397_09.patch | 81 ++
.../glib-2.0/glib-2.0/CVE-2024-34397_10.patch | 108 ++
.../glib-2.0/glib-2.0/CVE-2024-34397_11.patch | 133 +++
.../glib-2.0/glib-2.0/CVE-2024-34397_12.patch | 173 +++
.../glib-2.0/glib-2.0/CVE-2024-34397_13.patch | 513 +++++++++
.../glib-2.0/glib-2.0/CVE-2024-34397_14.patch | 75 ++
.../glib-2.0/glib-2.0/CVE-2024-34397_15.patch | 47 +
.../glib-2.0/glib-2.0/CVE-2024-34397_16.patch | 62 ++
.../glib-2.0/glib-2.0/CVE-2024-34397_17.patch | 121 +++
.../glib-2.0/glib-2.0/CVE-2024-34397_18.patch | 50 +
meta/recipes-core/glib-2.0/glib-2.0_2.72.3.bb | 18 +
meta/recipes-core/glibc/glibc-version.inc | 2 +-
.../libxml/libxml2/CVE-2024-34459.patch | 30 +
meta/recipes-core/libxml/libxml2_2.9.14.bb | 1 +
.../ruby/ruby/CVE-2024-27280.patch | 87 ++
meta/recipes-devtools/ruby/ruby_3.1.3.bb | 1 +
.../acpica/acpica/CVE-2024-24856.patch | 33 +
.../acpica/acpica_20211217.bb | 4 +-
.../man-pages/man-pages_5.13.bb | 12 +-
.../gobject-introspection_1.72.0.bb | 2 +-
31 files changed, 3536 insertions(+), 316 deletions(-)
delete mode 100644 meta/recipes-connectivity/openssl/openssl/CVE-2024-2511.patch
delete mode 100644 meta/recipes-connectivity/openssl/openssl/CVE-2024-4603.patch
rename meta/recipes-connectivity/openssl/{openssl_3.0.13.bb => openssl_3.0.14.bb} (98%)
create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_01.patch
create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_02.patch
create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_03.patch
create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_04.patch
create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_05.patch
create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_06.patch
create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_07.patch
create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_08.patch
create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_09.patch
create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_10.patch
create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_11.patch
create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_12.patch
create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_13.patch
create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_14.patch
create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_15.patch
create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_16.patch
create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_17.patch
create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_18.patch
create mode 100644 meta/recipes-core/libxml/libxml2/CVE-2024-34459.patch
create mode 100644 meta/recipes-devtools/ruby/ruby/CVE-2024-27280.patch
create mode 100644 meta/recipes-extended/acpica/acpica/CVE-2024-24856.patchSignature · 1 line
2.34.1
PATCH 1/9 glib-2.0: patch CVE-2024-34397
From: Peter Marko <[email protected]>
This is taken from https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4047
That MR was not merged as 2.72 is inactive branch now.
But it can be used by distributions, like Ubuntu did under
https://git.launchpad.net/ubuntu/+source/glib2.0/commit/?h=applied/ubuntu/jammy-security&id=94425c909b037c63c9dbbf72015f628ed4ad4aea
--- .../glib-2.0/glib-2.0/CVE-2024-34397_01.patch | 129 +++ .../glib-2.0/glib-2.0/CVE-2024-34397_02.patch | 62 ++ .../glib-2.0/glib-2.0/CVE-2024-34397_03.patch | 985 ++++++++++++++++++ .../glib-2.0/glib-2.0/CVE-2024-34397_04.patch | 253 +++++ .../glib-2.0/glib-2.0/CVE-2024-34397_05.patch | 88 ++ .../glib-2.0/glib-2.0/CVE-2024-34397_06.patch | 263 +++++ .../glib-2.0/glib-2.0/CVE-2024-34397_07.patch | 45 + .../glib-2.0/glib-2.0/CVE-2024-34397_08.patch | 168 +++ .../glib-2.0/glib-2.0/CVE-2024-34397_09.patch | 81 ++ .../glib-2.0/glib-2.0/CVE-2024-34397_10.patch | 108 ++ .../glib-2.0/glib-2.0/CVE-2024-34397_11.patch | 133 +++ .../glib-2.0/glib-2.0/CVE-2024-34397_12.patch | 173 +++ .../glib-2.0/glib-2.0/CVE-2024-34397_13.patch | 513 +++++++++ .../glib-2.0/glib-2.0/CVE-2024-34397_14.patch | 75 ++ .../glib-2.0/glib-2.0/CVE-2024-34397_15.patch | 47 + .../glib-2.0/glib-2.0/CVE-2024-34397_16.patch | 62 ++ .../glib-2.0/glib-2.0/CVE-2024-34397_17.patch | 121 +++ .../glib-2.0/glib-2.0/CVE-2024-34397_18.patch | 50 + meta/recipes-core/glib-2.0/glib-2.0_2.72.3.bb | 18 + 19 files changed, 3374 insertions(+) create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_01.patch create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_02.patch create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_03.patch create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_04.patch create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_05.patch create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_06.patch create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_07.patch create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_08.patch create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_09.patch create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_10.patch create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_11.patch create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_12.patch create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_13.patch create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_14.patch create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_15.patch create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_16.patch create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_17.patch create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_18.patch
meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_01.patch new file +129 -0
@@ -0,0 +1,129 @@ +From c4e3022918565253ffad52449dd0e648b6d772c7 Mon Sep 17 00:00:00 2001 +From: Philip Withnall <[email protected]> +Date: Tue, 28 Nov 2023 12:58:20 +0000 +Subject: [PATCH 01/18] gdbusmessage: Cache the arg0 value +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Technically we can’t rely on it being kept alive by the `message->body` +pointer, unless we can guarantee that the `GVariant` is always +serialised. That’s not necessarily the case, so keep a separate ref on +the arg0 value at all times. + +This avoids a potential use-after-free. + +Spotted by Thomas Haller in +https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3720#note_1924707. + +[This is a prerequisite for having tests pass after fixing the +vulnerability described in glib#3268, because after fixing that +vulnerability, the use-after-free genuinely does happen during +regression testing. -smcv] + +Signed-off-by: Philip Withnall <[email protected]> + +Helps: #3183, #3268 +(cherry picked from commit 10e9a917be7fb92b6b27837ef7a7f1d0be6095d5) + +CVE: CVE-2024-34397 +Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/c4e3022918565253ffad52449dd0e648b6d772c7] +Signed-off-by: Peter Marko <[email protected]> +--- + gio/gdbusmessage.c | 35 ++++++++++++++++++++++------------- + 1 file changed, 22 insertions(+), 13 deletions(-) + +diff --git a/gio/gdbusmessage.c b/gio/gdbusmessage.c +index ecef6cd3c..3fd1151ca 100644 +--- a/gio/gdbusmessage.c ++++ b/gio/gdbusmessage.c +@@ -506,6 +506,7 @@ struct _GDBusMessage + guint32 serial; + GHashTable *headers; + GVariant *body; ++ GVariant *arg0_cache; /* (nullable) (owned) */ + #ifdef G_OS_UNIX + GUnixFDList *fd_list; + #endif +@@ -528,6 +529,7 @@ g_dbus_message_finalize (GObject *object) + g_hash_table_unref (message->headers); + if (message->body != NULL) + g_variant_unref (message->body); ++ g_clear_pointer (&message->arg0_cache, g_variant_unref); + #ifdef G_OS_UNIX + if (message->fd_list != NULL) + g_object_unref (message->fd_list); +@@ -1163,6 +1165,7 @@ g_dbus_message_set_body (GDBusMessage *message, + if (body == NULL) + { + message->body = NULL; ++ message->arg0_cache = NULL; + g_dbus_message_set_signature (message, NULL); + } + else +@@ -1173,6 +1176,12 @@ g_dbus_message_set_body (GDBusMessage *message, + + message->body = g_variant_ref_sink (body); + ++ if (g_variant_is_of_type (message->body, G_VARIANT_TYPE_TUPLE) && ++ g_variant_n_children (message->body) > 0) ++ message->arg0_cache = g_variant_get_child_value (message->body, 0); ++ else ++ message->arg0_cache = NULL; ++ + type_string = g_variant_get_type_string (body); + type_string_len = strlen (type_string); + g_assert (type_string_len >= 2); +@@ -2325,6 +2334,14 @@ g_dbus_message_new_from_blob (guchar *blob, + 2, + &local_error); + g_variant_type_free (variant_type); ++ ++ if (message->body != NULL && ++ g_variant_is_of_type (message->body, G_VARIANT_TYPE_TUPLE) && ++ g_variant_n_children (message->body) > 0) ++ message->arg0_cache = g_variant_get_child_value (message->body, 0); ++ else ++ message->arg0_cache = NULL; ++ + if (message->body == NULL) + goto fail; + } +@@ -3364,22 +3381,13 @@ g_dbus_message_set_signature (GDBusMessage *message, + const gchar * + g_dbus_message_get_arg0 (GDBusMessage *message) + { +- const gchar *ret; +- + g_return_val_if_fail (G_IS_DBUS_MESSAGE (message), NULL); + +- ret = NULL; ++ if (message->arg0_cache != NULL && ++ g_variant_is_of_type (message->arg0_cache, G_VARIANT_TYPE_STRING)) ++ return g_variant_get_string (message->arg0_cache, NULL); + +- if (message->body != NULL && g_variant_is_of_type (message->body, G_VARIANT_TYPE_TUPLE)) +- { +- GVariant *item; +- item = g_variant_get_child_value (message->body, 0); +- if (g_variant_is_of_type (item, G_VARIANT_TYPE_STRING)) +- ret = g_variant_get_string (item, NULL); +- g_variant_unref (item); +- } +- +- return ret; ++ return NULL; + } + + /* ---------------------------------------------------------------------------------------------------- */ +@@ -3822,6 +3830,7 @@ g_dbus_message_copy (GDBusMessage *message, + * to just ref (as opposed to deep-copying) the GVariant instances + */ + ret->body = message->body != NULL ? g_variant_ref (message->body) : NULL; ++ ret->arg0_cache = message->arg0_cache != NULL ? g_variant_ref (message->arg0_cache) : NULL; + g_hash_table_iter_init (&iter, message->headers); + while (g_hash_table_iter_next (&iter, &header_key, (gpointer) &header_value)) + g_hash_table_insert (ret->headers, header_key, g_variant_ref (header_value)); +-- +2.30.2 +
meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_02.patch new file +62 -0
62 lines not on this page · raw message
meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_03.patch new file +985 -0
985 lines not on this page · raw message
meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_04.patch new file +253 -0
253 lines not on this page · raw message
meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_05.patch new file +88 -0
88 lines not on this page · raw message
meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_06.patch new file +263 -0
263 lines not on this page · raw message
meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_07.patch new file +45 -0
45 lines not on this page · raw message
meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_08.patch new file +168 -0
168 lines not on this page · raw message
meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_09.patch new file +81 -0
81 lines not on this page · raw message
meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_10.patch new file +108 -0
108 lines not on this page · raw message
meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_11.patch new file +133 -0
133 lines not on this page · raw message
meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_12.patch new file +173 -0
173 lines not on this page · raw message
meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_13.patch new file +513 -0
512 lines not on this page · raw message
meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_14.patch new file +75 -0
75 lines not on this page · raw message
meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_15.patch new file +47 -0
47 lines not on this page · raw message
meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_16.patch new file +62 -0
62 lines not on this page · raw message
meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_17.patch new file +121 -0
121 lines not on this page · raw message
meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-34397_18.patch new file +50 -0
50 lines not on this page · raw message
meta/recipes-core/glib-2.0/glib-2.0_2.72.3.bb +18 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.34.1
Part of the diff is not shown here. View the raw message.
PATCH 2/9 libxml2: Security fix for CVE-2024-34459
In reply to Steve SakomanFrom: Siddharth Doshi <[email protected]>
Upstream-Status: Backport from [https://gitlab.gnome.org/GNOME/libxml2/-/commit/2876ac5392a4e891b81e40e592c3ac6cb46016ce]
CVE's Fixed:
CVE-2024-34459 libxml2: buffer over-read in xmlHTMLPrintFileContext in xmllint.c
--- .../libxml/libxml2/CVE-2024-34459.patch | 30 +++++++++++++++++++ meta/recipes-core/libxml/libxml2_2.9.14.bb | 1 + 2 files changed, 31 insertions(+) create mode 100644 meta/recipes-core/libxml/libxml2/CVE-2024-34459.patch
meta/recipes-core/libxml/libxml2/CVE-2024-34459.patch new file +30 -0
@@ -0,0 +1,30 @@ +From 78fce372041d53cfeaaf2c11c71d07eef55ecfd1 Mon Sep 17 00:00:00 2001 +From: Nick Wellnhofer <[email protected]> +Date: Wed, 8 May 2024 11:49:31 +0200 +Subject: [PATCH] Fix buffer overread with `xmllint --htmlout` + +Add a missing bounds check. + +Upstream-Status: Backport from [https://gitlab.gnome.org/GNOME/libxml2/-/commit/2876ac5392a4e891b81e40e592c3ac6cb46016ce] +CVE: CVE-2024-34459 +Signed-off-by: Siddharth Doshi <[email protected]> +--- + xmllint.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/xmllint.c b/xmllint.c +index ee6bfdc..2f792f1 100644 +--- a/xmllint.c ++++ b/xmllint.c +@@ -602,7 +602,7 @@ xmlHTMLPrintFileContext(xmlParserInputPtr input) { + len = strlen(buffer); + snprintf(&buffer[len], sizeof(buffer) - len, "\n"); + cur = input->cur; +- while ((*cur == '\n') || (*cur == '\r')) ++ while ((cur > base) && ((*cur == '\n') || (*cur == '\r'))) + cur--; + n = 0; + while ((cur != base) && (n++ < 80)) { +-- +2.25.1 +
meta/recipes-core/libxml/libxml2_2.9.14.bb +1 -0
@@ -32,6 +32,7 @@ SRC_URI += "http://www.w3.org/XML/Test/xmlts20080827.tar;subdir=${BP};name=testt file://CVE-2023-45322-1.patch \ file://CVE-2023-45322-2.patch \ file://CVE-2024-25062.patch \ + file://CVE-2024-34459.patch \ " SRC_URI[archive.sha256sum] = "60d74a257d1ccec0475e749cba2f21559e48139efba6ff28224357c7c798dfee"
Signature · 1 line
2.34.1
PATCH 3/9 acpica: fix CVE-2024-24856
In reply to Steve SakomanFrom: Yogita Urade <[email protected]>
The memory allocation function ACPI_ALLOCATE_ZEROED does not guarantee a successful allocation, but the subsequent code directly dereferences the pointer that receives it, which may lead to null pointer dereference. To fix this issue, a null pointer check should be added. If it is null, return exception code AE_NO_MEMORY.
Reference:
https://nvd.nist.gov/vuln/detail/CVE-2024-24856
--- .../acpica/acpica/CVE-2024-24856.patch | 33 +++++++++++++++++++ .../acpica/acpica_20211217.bb | 4 ++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-extended/acpica/acpica/CVE-2024-24856.patch
meta/recipes-extended/acpica/acpica/CVE-2024-24856.patch new file +33 -0
@@ -0,0 +1,33 @@ +From 4d4547cf13cca820ff7e0f859ba83e1a610b9fd0 Mon Sep 17 00:00:00 2001 +From: Huai-Yuan Liu <[email protected]> +Date: Tue, 4 Jun 2024 11:52:15 +0000 +Subject: [PATCH] check null return of ACPI_ALLOCATE_ZEROED in + +AcpiDbConvertToPackage ACPI_ALLOCATE_ZEROED may fails, Elements +might be null and will cause null pointer dereference later. + +Signed-off-by: Huai-Yuan Liu <[email protected]> + +CVE: CVE-2024-24856 +Upstream-Status: Backport [https://github.com/acpica/acpica/commit/4d4547cf13cca820ff7e0f859ba83e1a610b9fd0] + +Signed-off-by: Yogita Urade <[email protected]> +--- + source/components/debugger/dbconvert.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/source/components/debugger/dbconvert.c b/source/components/debugger/dbconvert.c +index 55307d0..c17a5ab 100644 +--- a/source/components/debugger/dbconvert.c ++++ b/source/components/debugger/dbconvert.c +@@ -354,6 +354,8 @@ AcpiDbConvertToPackage ( + + Elements = ACPI_ALLOCATE_ZEROED ( + DB_DEFAULT_PKG_ELEMENTS * sizeof (ACPI_OBJECT)); ++ if (!Elements) ++ return (AE_NO_MEMORY); + + This = String; + for (i = 0; i < (DB_DEFAULT_PKG_ELEMENTS - 1); i++) +-- +2.40.0
meta/recipes-extended/acpica/acpica_20211217.bb +3 -1
@@ -16,7 +16,9 @@ COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux" DEPENDS = "m4-native flex-native bison-native" -SRC_URI = "https://acpica.org/sites/acpica/files/acpica-unix-${PV}.tar.gz" +SRC_URI = "https://acpica.org/sites/acpica/files/acpica-unix-${PV}.tar.gz \ + file://CVE-2024-24856.patch \ + " SRC_URI[sha256sum] = "2511f85828820d747fa3e2c3433d3a38c22db3d9c2fd900e1a84eb4173cb5992" UPSTREAM_CHECK_URI = "https://acpica.org/downloads"
Signature · 1 line
2.34.1
PATCH 4/9 ruby: fix CVE-2024-27280
In reply to Steve SakomanFrom: Yogita Urade <[email protected]>
A buffer-overread issue was discovered in StringIO 3.0.1, as distributed in Ruby 3.0.x through 3.0.6 and 3.1.x through 3.1.4. The ungetbyte and ungetc methods on a StringIO can read past the end of a string, and a subsequent call to StringIO.gets may return the memory value. 3.0.3 is the main fixed version; however, for Ruby 3.0 users, a fixed version is stringio 3.0.1.1, and for Ruby 3.1 users, a fixed version is stringio 3.0.1.2.
Reference:
https://nvd.nist.gov/vuln/detail/CVE-2024-27280
--- .../ruby/ruby/CVE-2024-27280.patch | 87 +++++++++++++++++++ meta/recipes-devtools/ruby/ruby_3.1.3.bb | 1 + 2 files changed, 88 insertions(+) create mode 100644 meta/recipes-devtools/ruby/ruby/CVE-2024-27280.patch
meta/recipes-devtools/ruby/ruby/CVE-2024-27280.patch new file +87 -0
@@ -0,0 +1,87 @@ +From a35268a3ac1b5f0058e5b7c1a041a7e86d9da067 Mon Sep 17 00:00:00 2001 +From: Nobuyoshi Nakada <[email protected]> +Date: Mon, 10 Jun 2024 11:46:53 +0000 +Subject: [PATCH] Fix expanding size at ungetc/ungetbyte + +CVE: CVE-2024-27280 +Upstream-Status: Backport [https://github.com/ruby/stringio/commit/a35268a3ac1b5f0058e5b7c1a041a7e86d9da067] + +Signed-off-by: Yogita Urade <[email protected]> +--- + ext/stringio/stringio.c | 2 +- + test/stringio/test_stringio.rb | 25 +++++++++++++++++++++---- + 2 files changed, 22 insertions(+), 5 deletions(-) + +diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c +index 8df07e8..b2e8632 100644 +--- a/ext/stringio/stringio.c ++++ b/ext/stringio/stringio.c +@@ -984,7 +984,7 @@ strio_unget_bytes(struct StringIO *ptr, const char *cp, long cl) + len = RSTRING_LEN(str); + rest = pos - len; + if (cl > pos) { +- long ex = (rest < 0 ? cl-pos : cl+rest); ++ long ex = cl - (rest < 0 ? pos : len); + rb_str_modify_expand(str, ex); + rb_str_set_len(str, len + ex); + s = RSTRING_PTR(str); +diff --git a/test/stringio/test_stringio.rb b/test/stringio/test_stringio.rb +index e0b4504..4853513 100644 +--- a/test/stringio/test_stringio.rb ++++ b/test/stringio/test_stringio.rb +@@ -757,6 +757,15 @@ class TestStringIO < Test::Unit::TestCase + assert_equal("b""\0""a", s.string) + end + ++ def test_ungetc_fill ++ count = 100 ++ s = StringIO.new ++ s.print 'a' * count ++ s.ungetc('b' * (count * 5)) ++ assert_equal((count * 5), s.string.size) ++ assert_match(/\Ab+\z/, s.string) ++ end ++ + def test_ungetbyte_pos + b = '\\b00010001 \\B00010001 \\b1 \\B1 \\b000100011' + s = StringIO.new( b ) +@@ -782,6 +791,15 @@ class TestStringIO < Test::Unit::TestCase + assert_equal("b""\0""a", s.string) + end + ++ def test_ungetbyte_fill ++ count = 100 ++ s = StringIO.new ++ s.print 'a' * count ++ s.ungetbyte('b' * (count * 5)) ++ assert_equal((count * 5), s.string.size) ++ assert_match(/\Ab+\z/, s.string) ++ end ++ + def test_frozen + s = StringIO.new + s.freeze +@@ -825,18 +843,17 @@ class TestStringIO < Test::Unit::TestCase + end + + def test_overflow +- omit if RbConfig::SIZEOF["void*"] > RbConfig::SIZEOF["long"] ++ return if RbConfig::SIZEOF["void*"] > RbConfig::SIZEOF["long"] + limit = RbConfig::LIMITS["INTPTR_MAX"] - 0x10 + assert_separately(%w[-rstringio], "#{<<-"begin;"}\n#{<<-"end;"}") + begin; + limit = #{limit} + ary = [] +- while true ++ begin + x = "a"*0x100000 + break if [x].pack("p").unpack("i!")[0] < 0 + ary << x +- omit if ary.size > 100 +- end ++ end while ary.size <= 100 + s = StringIO.new(x) + s.gets("xxx", limit) + assert_equal(0x100000, s.pos) +-- +2.40.0
meta/recipes-devtools/ruby/ruby_3.1.3.bb +1 -0
@@ -34,6 +34,7 @@ SRC_URI = "http://cache.ruby-lang.org/pub/ruby/${SHRT_VER}/ruby-${PV}.tar.gz \ file://CVE-2023-36617_1.patch \ file://CVE-2023-36617_2.patch \ file://CVE-2024-27281.patch \ + file://CVE-2024-27280.patch \ " UPSTREAM_CHECK_URI = "https://www.ruby-lang.org/en/downloads/"
Signature · 1 line
2.34.1
PATCH 5/9 glibc: stable 2.35 branch updates
In reply to Steve SakomanFrom: Deepthi Hemraj <[email protected]>
Below commit on glibc-2.35 stable branch is updated. 72abffe225 Force DT_RPATH for --enable-hardcoded-path-in-tests
--- meta/recipes-core/glibc/glibc-version.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/glibc/glibc-version.inc +1 -1
@@ -1,6 +1,6 @@ SRCBRANCH ?= "release/2.35/master" PV = "2.35" -SRCREV_glibc ?= "54a666dc5c94897dab63856ba264ab2c53503303" +SRCREV_glibc ?= "72abffe225485d10ea76adde963c13157bf3b310" SRCREV_localedef ?= "794da69788cbf9bf57b59a852f9f11307663fa87" GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
Signature · 1 line
2.34.1
PATCH 6/9 openssl: Upgrade 3.0.13 -> 3.0.14
In reply to Steve SakomanFrom: Siddharth <[email protected]>
CVE's Fixed by upgrade:
CVE-2024-4741: Fixed potential use after free after SSL_free_buffers() is called
CVE-2024-4603: Fixed an issue where checking excessively long DSA keys or parameters may be very slow
CVE-2024-2511: Fixed unbounded memory growth with session handling in TLSv1.3
Removed backports of CVE-2024-2511 and CVE-2024-4603 as they are already fixed.
Detailed Information:
https://github.com/openssl/openssl/blob/openssl-3.0/CHANGES.md#changes-between-3013-and-3014-4-jun-2024
---
.../openssl/openssl/CVE-2024-2511.patch | 122 ------------
.../openssl/openssl/CVE-2024-4603.patch | 180 ------------------
.../{openssl_3.0.13.bb => openssl_3.0.14.bb} | 4 +-
3 files changed, 1 insertion(+), 305 deletions(-)
delete mode 100644 meta/recipes-connectivity/openssl/openssl/CVE-2024-2511.patch
delete mode 100644 meta/recipes-connectivity/openssl/openssl/CVE-2024-4603.patch
rename meta/recipes-connectivity/openssl/{openssl_3.0.13.bb => openssl_3.0.14.bb} (98%)meta/recipes-connectivity/openssl/openssl/CVE-2024-2511.patch deleted +0 -122
@@ -1,122 +0,0 @@ -From b52867a9f618bb955bed2a3ce3db4d4f97ed8e5d Mon Sep 17 00:00:00 2001 -From: Matt Caswell <[email protected]> -Date: Tue, 5 Mar 2024 15:43:53 +0000 -Subject: [PATCH] Fix unconstrained session cache growth in TLSv1.3 - -In TLSv1.3 we create a new session object for each ticket that we send. -We do this by duplicating the original session. If SSL_OP_NO_TICKET is in -use then the new session will be added to the session cache. However, if -early data is not in use (and therefore anti-replay protection is being -used), then multiple threads could be resuming from the same session -simultaneously. If this happens and a problem occurs on one of the threads, -then the original session object could be marked as not_resumable. When we -duplicate the session object this not_resumable status gets copied into the -new session object. The new session object is then added to the session -cache even though it is not_resumable. - -Subsequently, another bug means that the session_id_length is set to 0 for -sessions that are marked as not_resumable - even though that session is -still in the cache. Once this happens the session can never be removed from -the cache. When that object gets to be the session cache tail object the -cache never shrinks again and grows indefinitely. - -CVE-2024-2511 - -Reviewed-by: Neil Horman <[email protected]> -Reviewed-by: Tomas Mraz <[email protected]> -(Merged from https://github.com/openssl/openssl/pull/24044) - -(cherry picked from commit 7e4d731b1c07201ad9374c1cd9ac5263bdf35bce) - -CVE: CVE-2024-2511 -Upstream-Status: Backport [https://github.com/openssl/openssl/commit/b52867a9f618bb955bed2a3ce3db4d4f97ed8e5d] -Signed-off-by: Peter Marko <[email protected]> ---- - ssl/ssl_lib.c | 5 +++-- - ssl/ssl_sess.c | 28 ++++++++++++++++++++++------ - ssl/statem/statem_srvr.c | 5 ++--- - 3 files changed, 27 insertions(+), 11 deletions(-) - -diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c -index 2c8479eb5fc69..eed649c6fdee9 100644 ---- a/ssl/ssl_lib.c -+++ b/ssl/ssl_lib.c -@@ -3736,9 +3736,10 @@ void ssl_update_cache(SSL *s, int mode) - - /* - * If the session_id_length is 0, we are not supposed to cache it, and it -- * would be rather hard to do anyway :-) -+ * would be rather hard to do anyway :-). Also if the session has already -+ * been marked as not_resumable we should not cache it for later reuse. - */ -- if (s->session->session_id_length == 0) -+ if (s->session->session_id_length == 0 || s->session->not_resumable) - return; - - /* -diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c -index d836b33ed0e81..75adbd9e52b40 100644 ---- a/ssl/ssl_sess.c -+++ b/ssl/ssl_sess.c -@@ -152,16 +152,11 @@ SSL_SESSION *SSL_SESSION_new(void) - return ss; - } - --SSL_SESSION *SSL_SESSION_dup(const SSL_SESSION *src) --{ -- return ssl_session_dup(src, 1); --} -- - /* - * Create a new SSL_SESSION and duplicate the contents of |src| into it. If - * ticket == 0 then no ticket information is duplicated, otherwise it is. - */ --SSL_SESSION *ssl_session_dup(const SSL_SESSION *src, int ticket) -+static SSL_SESSION *ssl_session_dup_intern(const SSL_SESSION *src, int ticket) - { - SSL_SESSION *dest; - -@@ -285,6 +280,27 @@ SSL_SESSION *ssl_session_dup(const SSL_SESSION *src, int ticket) - return NULL; - } - -+SSL_SESSION *SSL_SESSION_dup(const SSL_SESSION *src) -+{ -+ return ssl_session_dup_intern(src, 1); -+} -+ -+/* -+ * Used internally when duplicating a session which might be already shared. -+ * We will have resumed the original session. Subsequently we might have marked -+ * it as non-resumable (e.g. in another thread) - but this copy should be ok to -+ * resume from. -+ */ -+SSL_SESSION *ssl_session_dup(const SSL_SESSION *src, int ticket) -+{ -+ SSL_SESSION *sess = ssl_session_dup_intern(src, ticket); -+ -+ if (sess != NULL) -+ sess->not_resumable = 0; -+ -+ return sess; -+} -+ - const unsigned char *SSL_SESSION_get_id(const SSL_SESSION *s, unsigned int *len) - { - if (len) -diff --git a/ssl/statem/statem_srvr.c b/ssl/statem/statem_srvr.c -index a9e67f9d32a77..6c942e6bcec29 100644 ---- a/ssl/statem/statem_srvr.c -+++ b/ssl/statem/statem_srvr.c -@@ -2338,9 +2338,8 @@ int tls_construct_server_hello(SSL *s, WPACKET *pkt) - * so the following won't overwrite an ID that we're supposed - * to send back. - */ -- if (s->session->not_resumable || -- (!(s->ctx->session_cache_mode & SSL_SESS_CACHE_SERVER) -- && !s->hit)) -+ if (!(s->ctx->session_cache_mode & SSL_SESS_CACHE_SERVER) -+ && !s->hit) - s->session->session_id_length = 0; - - if (usetls13) {
meta/recipes-connectivity/openssl/openssl/CVE-2024-4603.patch deleted +0 -180
180 lines not on this page · raw message
meta/recipes-connectivity/openssl/openssl_3.0.14.bb renamed from meta/recipes-connectivity/openssl/openssl_3.0.13.bb +1 -3
@@ -12,15 +12,13 @@ SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \ file://0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch \ file://afalg.patch \ file://0001-Configure-do-not-tweak-mips-cflags.patch \ - file://CVE-2024-2511.patch \ - file://CVE-2024-4603.patch \ " SRC_URI:append:class-nativesdk = " \ file://environment.d-openssl.sh \ " -SRC_URI[sha256sum] = "88525753f79d3bec27d2fa7c66aa0b92b3aa9498dafd93d7cfa4b3780cdae313" +SRC_URI[sha256sum] = "eeca035d4dd4e84fc25846d952da6297484afa0650a6f84c682e39df3a4123ca" inherit lib_package multilib_header multilib_script ptest perlnative MULTILIB_SCRIPTS = "${PN}-bin:${bindir}/c_rehash"
Signature · 1 line
2.34.1
PATCH 7/9 gobject-introspection: Do not hardcode objdump name
In reply to Steve SakomanFrom: Khem Raj <[email protected]>
Use OBJDUMP variable in the script, this helps in using the lddwrapper with recipes which maybe using different objdump tools e.g.l llvm-objdump or vice-versa
--- .../gobject-introspection/gobject-introspection_1.72.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-gnome/gobject-introspection/gobject-introspection_1.72.0.bb +1 -1
@@ -103,7 +103,7 @@ EOF # for a different architecture cat > ${B}/g-ir-scanner-lddwrapper << EOF #!/bin/sh -$OBJDUMP -p "\$@" +\$OBJDUMP -p "\$@" EOF chmod +x ${B}/g-ir-scanner-lddwrapper
Signature · 1 line
2.34.1
PATCH 8/9 man-pages: add an alternative link name for crypt_r.3
In reply to Steve SakomanFrom: Thomas Perrot <[email protected]>
Because crypt_r.3 is also provided by libxcrypt-doc.
--- meta/recipes-extended/man-pages/man-pages_5.13.bb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
meta/recipes-extended/man-pages/man-pages_5.13.bb +4 -3
@@ -30,7 +30,8 @@ FILES:${PN} = "${mandir}/*" inherit update-alternatives ALTERNATIVE_PRIORITY = "100" -ALTERNATIVE:${PN} = "passwd.5 getspnam.3 crypt.3" -ALTERNATIVE_LINK_NAME[passwd.5] = "${mandir}/man5/passwd.5" -ALTERNATIVE_LINK_NAME[getspnam.3] = "${mandir}/man3/getspnam.3" +ALTERNATIVE:${PN} = "crypt.3 crypt_r.3 getspnam.3 passwd.5" ALTERNATIVE_LINK_NAME[crypt.3] = "${mandir}/man3/crypt.3" +ALTERNATIVE_LINK_NAME[crypt_r.3] = "${mandir}/man3/crypt_r.3" +ALTERNATIVE_LINK_NAME[getspnam.3] = "${mandir}/man3/getspnam.3" +ALTERNATIVE_LINK_NAME[passwd.5] = "${mandir}/man5/passwd.5"
Signature · 1 line
2.34.1
PATCH 9/9 man-pages: remove conflict pages
In reply to Steve SakomanFrom: Changqing Li <[email protected]>
Remove the pages which libxcrypt and shadow already have to avoid following conflicts during install man-pages and libxcrypt/shadow at the same time.
Error: Transaction test error:
file /usr/share/man/man3/crypt.3 from install of libcrypt-doc-4.4.33-r0.x86_64 conflicts with file from package man-pages-6.04-r0.x86_64
--- meta/recipes-extended/man-pages/man-pages_5.13.bb | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-)
meta/recipes-extended/man-pages/man-pages_5.13.bb +4 -9
@@ -21,17 +21,12 @@ do_compile[noexec] = "1" do_install() { oe_runmake install prefix=${prefix} DESTDIR=${D} + rm -rf ${D}${mandir}/man3/crypt.3 + rm -rf ${D}${mandir}/man3/crypt_r.3 + rm -rf ${D}${mandir}/man3/getspnam.3 + rm -rf ${D}${mandir}/man5/passwd.5 } # Only deliveres man-pages so FILES:${PN} gets everything FILES:${PN}-doc = "" FILES:${PN} = "${mandir}/*" - -inherit update-alternatives - -ALTERNATIVE_PRIORITY = "100" -ALTERNATIVE:${PN} = "crypt.3 crypt_r.3 getspnam.3 passwd.5" -ALTERNATIVE_LINK_NAME[crypt.3] = "${mandir}/man3/crypt.3" -ALTERNATIVE_LINK_NAME[crypt_r.3] = "${mandir}/man3/crypt_r.3" -ALTERNATIVE_LINK_NAME[getspnam.3] = "${mandir}/man3/getspnam.3" -ALTERNATIVE_LINK_NAME[passwd.5] = "${mandir}/man5/passwd.5"
Signature · 1 line
2.34.1