public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Steve Sakoman <steve@sakoman.com>
To: openembedded-core@lists.openembedded.org
Subject: [OE-core][kirkstone 04/19] glib-2.0: Backport fix for CVE-2024-52533
Date: Fri, 22 Nov 2024 13:26:23 -0800	[thread overview]
Message-ID: <c7ecdd6530e18efd651e2ea57565481f66f7b1cf.1732310669.git.steve@sakoman.com> (raw)
In-Reply-To: <cover.1732310669.git.steve@sakoman.com>

From: Vijay Anusuri <vanusuri@mvista.com>

Upstream-Status: Backport from https://gitlab.gnome.org/GNOME/glib/-/commit/ec0b708b981af77fef8e4bbb603cde4de4cd2e29

Reference: https://security-tracker.debian.org/tracker/CVE-2024-52533

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 .../glib-2.0/glib-2.0/CVE-2024-52533.patch    | 49 +++++++++++++++++++
 meta/recipes-core/glib-2.0/glib-2.0_2.72.3.bb |  1 +
 2 files changed, 50 insertions(+)
 create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-52533.patch

diff --git a/meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-52533.patch b/meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-52533.patch
new file mode 100644
index 0000000000..3a06a9d782
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/CVE-2024-52533.patch
@@ -0,0 +1,49 @@
+From ec0b708b981af77fef8e4bbb603cde4de4cd2e29 Mon Sep 17 00:00:00 2001
+From: Michael Catanzaro <mcatanzaro@redhat.com>
+Date: Thu, 19 Sep 2024 18:35:53 +0100
+Subject: [PATCH] gsocks4aproxy: Fix a single byte buffer overflow in connect
+ messages
+
+`SOCKS4_CONN_MSG_LEN` failed to account for the length of the final nul
+byte in the connect message, which is an addition in SOCKSv4a vs
+SOCKSv4.
+
+This means that the buffer for building and transmitting the connect
+message could be overflowed if the username and hostname are both
+`SOCKS4_MAX_LEN` (255) bytes long.
+
+Proxy configurations are normally statically configured, so the username
+is very unlikely to be near its maximum length, and hence this overflow
+is unlikely to be triggered in practice.
+
+(Commit message by Philip Withnall, diagnosis and fix by Michael
+Catanzaro.)
+
+Fixes: #3461
+
+Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/ec0b708b981af77fef8e4bbb603cde4de4cd2e29]
+CVE: CVE-2024-52533
+Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
+---
+ gio/gsocks4aproxy.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/gio/gsocks4aproxy.c b/gio/gsocks4aproxy.c
+index 3dad118eb7..b3146d08fd 100644
+--- a/gio/gsocks4aproxy.c
++++ b/gio/gsocks4aproxy.c
+@@ -79,9 +79,9 @@ g_socks4a_proxy_init (GSocks4aProxy *proxy)
+  * +----+----+----+----+----+----+----+----+----+----+....+----+------+....+------+
+  * | VN | CD | DSTPORT |      DSTIP        | USERID       |NULL| HOST |    | NULL |
+  * +----+----+----+----+----+----+----+----+----+----+....+----+------+....+------+
+- *    1    1      2              4           variable       1    variable
++ *    1    1      2              4           variable       1    variable    1
+  */
+-#define SOCKS4_CONN_MSG_LEN	    (9 + SOCKS4_MAX_LEN * 2)
++#define SOCKS4_CONN_MSG_LEN	    (10 + SOCKS4_MAX_LEN * 2)
+ static gint
+ set_connect_msg (guint8      *msg,
+ 		 const gchar *hostname,
+-- 
+GitLab
+
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.72.3.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.72.3.bb
index 239099d568..8007de0613 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.72.3.bb
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.72.3.bb
@@ -50,6 +50,7 @@ SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
            file://CVE-2024-34397_17.patch \
            file://CVE-2024-34397_18.patch \
            file://0001-gvariant-serialiser-Convert-endianness-of-offsets.patch \
+           file://CVE-2024-52533.patch \
            "
 SRC_URI:append:class-native = " file://relocate-modules.patch"
 
-- 
2.34.1



  parent reply	other threads:[~2024-11-22 21:26 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-22 21:26 [OE-core][kirkstone 00/19] Patch review Steve Sakoman
2024-11-22 21:26 ` [OE-core][kirkstone 01/19] ghostscript: Backport fix for multiple CVE's Steve Sakoman
2024-11-22 21:26 ` [OE-core][kirkstone 02/19] libsoup: Fix for CVE-2024-52530 and CVE-2024-52532 Steve Sakoman
2024-11-22 21:26 ` [OE-core][kirkstone 03/19] libsoup-2.4: Backport fix " Steve Sakoman
2024-11-22 21:26 ` Steve Sakoman [this message]
2024-11-22 21:26 ` [OE-core][kirkstone 05/19] ffmpeg: fix CVE-2024-32230 Steve Sakoman
2024-11-22 21:26 ` [OE-core][kirkstone 06/19] ffmpeg: fix CVE-2023-51793 Steve Sakoman
2024-11-22 21:26 ` [OE-core][kirkstone 07/19] ffmpeg: fix CVE-2023-50008 Steve Sakoman
2024-11-22 21:26 ` [OE-core][kirkstone 08/19] ffmpeg: fix CVE-2024-31582 Steve Sakoman
2024-11-22 21:26 ` [OE-core][kirkstone 09/19] ffmpeg: fix CVE-2024-31578 Steve Sakoman
2024-11-22 21:26 ` [OE-core][kirkstone 10/19] ffmpeg: fix CVE-2023-51794 Steve Sakoman
2024-11-22 21:26 ` [OE-core][kirkstone 11/19] wireless-regdb: upgrade 2024.07.04 -> 2024.10.07 Steve Sakoman
2024-11-22 21:26 ` [OE-core][kirkstone 12/19] scripts/install-buildtools: Update to 4.0.22 Steve Sakoman
2024-11-22 21:26 ` [OE-core][kirkstone 13/19] webkitgtk: Fix build on 32bit arm Steve Sakoman
2024-11-22 21:26 ` [OE-core][kirkstone 14/19] webkitgtk: fix perl-native dependency Steve Sakoman
2024-11-22 21:26 ` [OE-core][kirkstone 15/19] lttng-modules: fix build error after kernel update to 5.15.171 Steve Sakoman
2024-11-22 21:26 ` [OE-core][kirkstone 16/19] webkitgtk: reduce size of -dbg package Steve Sakoman
2024-11-22 21:26 ` [OE-core][kirkstone 17/19] llvm: " Steve Sakoman
2024-11-22 21:26 ` [OE-core][kirkstone 18/19] toolchain-shar-extract.sh: exit when post-relocate-setup.sh fails Steve Sakoman
2024-11-22 21:26 ` [OE-core][kirkstone 19/19] udev-extraconf: fix network.sh script did not configure hotplugged interfaces Steve Sakoman

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=c7ecdd6530e18efd651e2ea57565481f66f7b1cf.1732310669.git.steve@sakoman.com \
    --to=steve@sakoman.com \
    --cc=openembedded-core@lists.openembedded.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