summaryrefslogtreecommitdiff
path: root/aports/busybox/0005-libbb-sockaddr2str-ensure-only-printable-characters-.patch
diff options
context:
space:
mode:
authorPÁLI Gábor János <pali.gabor@gmail.com>2023-08-03 10:10:44 +0200
committerPÁLI Gábor János <pali.gabor@gmail.com>2023-09-16 17:58:03 +0200
commit89279d87c5d3e0ea330be1f927e3f3bc59dbc2a7 (patch)
tree353bc9a026d0140151e760efbc4f6a6a6b24a020 /aports/busybox/0005-libbb-sockaddr2str-ensure-only-printable-characters-.patch
parent084335e136581edc28137b152cc559778224570e (diff)
downloadfreebsd-wifibox-alpine-89279d87c5d3e0ea330be1f927e3f3bc59dbc2a7.zip
Update to Linux 6.1 and Alpine 3.18
- Update base-layout to 3.4.3 - Update busybox to 1.36.1 - Update iptables to 1.8.9 - Update linux-lts to 6.1.53 - Update to openrc to 0.48 - Update rtl8821ce to snapshot of 20230915 - Replace rtwB88 with a third-party driver - Update rtw89 to snapshot of 20230913 - Import wpa_supplicant fixes from Arch Linux
Diffstat (limited to 'aports/busybox/0005-libbb-sockaddr2str-ensure-only-printable-characters-.patch')
-rw-r--r--aports/busybox/0005-libbb-sockaddr2str-ensure-only-printable-characters-.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/aports/busybox/0005-libbb-sockaddr2str-ensure-only-printable-characters-.patch b/aports/busybox/0005-libbb-sockaddr2str-ensure-only-printable-characters-.patch
new file mode 100644
index 0000000..95616c7
--- /dev/null
+++ b/aports/busybox/0005-libbb-sockaddr2str-ensure-only-printable-characters-.patch
@@ -0,0 +1,40 @@
+From 6a678ab440ec8c0d21843569182eeb452c289a58 Mon Sep 17 00:00:00 2001
+From: Ariadne Conill <ariadne@dereferenced.org>
+Date: Sun, 3 Apr 2022 18:13:37 +0000
+Subject: [PATCH] libbb: sockaddr2str: ensure only printable characters are
+ returned for the hostname part
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+CVE: Pending
+Upstream-Status: Pending
+Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
+---
+ libbb/xconnect.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/libbb/xconnect.c b/libbb/xconnect.c
+index 0e0b247b8..02c061e67 100644
+--- a/libbb/xconnect.c
++++ b/libbb/xconnect.c
+@@ -497,8 +497,9 @@ static char* FAST_FUNC sockaddr2str(const struct sockaddr *sa, int flags)
+ );
+ if (rc)
+ return NULL;
++ /* ensure host contains only printable characters */
+ if (flags & IGNORE_PORT)
+- return xstrdup(host);
++ return xstrdup(printable_string(host));
+ #if ENABLE_FEATURE_IPV6
+ if (sa->sa_family == AF_INET6) {
+ if (strchr(host, ':')) /* heh, it's not a resolved hostname */
+@@ -509,7 +510,7 @@ static char* FAST_FUNC sockaddr2str(const struct sockaddr *sa, int flags)
+ #endif
+ /* For now we don't support anything else, so it has to be INET */
+ /*if (sa->sa_family == AF_INET)*/
+- return xasprintf("%s:%s", host, serv);
++ return xasprintf("%s:%s", printable_string(host), serv);
+ /*return xstrdup(host);*/
+ }
+