Skip to content

Commit 8f4ff73

Browse files
committed
import patch for CVE-2024-52533
0 parents  commit 8f4ff73

File tree

6 files changed

+55
-0
lines changed

6 files changed

+55
-0
lines changed

.container

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ghcr.io/gardenlinux/repo-debian-snapshot@sha256:6bb682e9665ec7e88da709eaf6867a5045afa3b89d0afd4e8225d9dda3ff9d99

.github/workflows/build.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
on:
2+
push:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: '0 0 * * *'
6+
jobs:
7+
build:
8+
uses: gardenlinux/package-build/.github/workflows/build.yml@main
9+
with:
10+
release: ${{ github.ref == 'refs/heads/main' }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.build

prepare_source

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
apt_src glib2.0
2+
import_upstream_patches
3+
version_suffix=gl0~bp1592
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
commit 48fc6b8c3612bc1c536cdb3fd8ea8662f58b1e62
2+
Author: Michael Catanzaro <mcatanzaro@redhat.com>
3+
Date: Thu Sep 19 18:35:53 2024 +0100
4+
5+
gsocks4aproxy: Fix a single byte buffer overflow in connect messages
6+
7+
`SOCKS4_CONN_MSG_LEN` failed to account for the length of the final nul
8+
byte in the connect message, which is an addition in SOCKSv4a vs
9+
SOCKSv4.
10+
11+
This means that the buffer for building and transmitting the connect
12+
message could be overflowed if the username and hostname are both
13+
`SOCKS4_MAX_LEN` (255) bytes long.
14+
15+
Proxy configurations are normally statically configured, so the username
16+
is very unlikely to be near its maximum length, and hence this overflow
17+
is unlikely to be triggered in practice.
18+
19+
(Commit message by Philip Withnall, diagnosis and fix by Michael
20+
Catanzaro.)
21+
22+
Fixes: #3461
23+
24+
diff --git a/gio/gsocks4aproxy.c b/gio/gsocks4aproxy.c
25+
index 3dad118eb..b3146d08f 100644
26+
--- a/gio/gsocks4aproxy.c
27+
+++ b/gio/gsocks4aproxy.c
28+
@@ -79,9 +79,9 @@ g_socks4a_proxy_init (GSocks4aProxy *proxy)
29+
* +----+----+----+----+----+----+----+----+----+----+....+----+------+....+------+
30+
* | VN | CD | DSTPORT | DSTIP | USERID |NULL| HOST | | NULL |
31+
* +----+----+----+----+----+----+----+----+----+----+....+----+------+....+------+
32+
- * 1 1 2 4 variable 1 variable
33+
+ * 1 1 2 4 variable 1 variable 1
34+
*/
35+
-#define SOCKS4_CONN_MSG_LEN (9 + SOCKS4_MAX_LEN * 2)
36+
+#define SOCKS4_CONN_MSG_LEN (10 + SOCKS4_MAX_LEN * 2)
37+
static gint
38+
set_connect_msg (guint8 *msg,
39+
const gchar *hostname,

upstream_patches/series

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CVE-2024-52533.patch

0 commit comments

Comments
 (0)