Files
buildroot/package/busybox/0003-libbb-sockaddr2str-ensure-only-printable-characters-.patch
Clement Ramirez ed84e971c3 package/busybox bump version to 1.37.0
Patch 0005-seedrng-fix-for-glibc-2.24-not-providing-getrandom.patch is
dropped as it is upstream as of
https://git.busybox.net/busybox/commit/?id=200a9669fbf6f06894e4243cccc9fc11a1a6073a

Patch 0006-seedrng-fix-for-glibc-2.24-not-providing-random-head.patch
is dropped as it is upstream as of
https://git.busybox.net/busybox/commit/?id=cb57abb46f06f4ede8d9ccbdaac67377fdf416cf

Patch 0008-shell-fix-SIGWINCH-and-SIGCHLD-in-hush-interrupting-.patch
is dropped as it is upstream as of
https://git.busybox.net/busybox/commit/?id=93e0898c663a533082b5f3c2e7dcce93ec47076d

Patch 0011-awk-fix-use-after-realloc-CVE-2021-42380-closes-1560.patch
is dropped as it is upstream as of
https://git.busybox.net/busybox/commit/?id=5dcc443dba039b305a510c01883e9f34e42656ae

Patch 0012-awk-fix-use-after-free-CVE-2023-42363.patch is dropped as
it is upstream as of
https://git.busybox.net/busybox/commit/?id=fb08d43d44d1fea1f741fafb9aa7e1958a5f69aa

Patch 0013-awk-fix-precedence-of-relative-to.patch is dropped as it is
upstream as of
https://git.busybox.net/busybox/commit/?id=0256e00a9d077588bd3a39f5a1ef7e2eaa2911e4

Patch 0014-awk-fix-ternary-operator-and-precedence-of.patch is dropped
as it is upstream as of
https://git.busybox.net/busybox/commit/?id=38335df9e9f45378c3407defd38b5b610578bdda

Remaining patches are renumbered/refreshed.

Patch 0010-libbb-sha-add-missing-sha-NI-guard.patch is added, taken
from the mailing list, to fix a build issue.

Patch 0011-syslogd-fix-wrong-OPT_locallog-flag-detection.patch, taken
from the mailing list, is added to fix a runtime issue with syslogd
which was pointed out by Bernd Kulhs.

Signed-off-by: Clement Ramirez <clement@clementramirez.fr>
[Thomas: update with more patches being dropped, renumber patches,
backport some patches needed to fix known build and runtime issues]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2025-02-04 09:55:25 +01:00

43 lines
1.5 KiB
Diff

From 68eaf20d86d4fe0f16a914817217f386155157cc Mon Sep 17 00:00:00 2001
From: Ariadne Conill <ariadne@dereferenced.org>
Date: Mon, 19 Sep 2022 14:15:12 +0200
Subject: [PATCH] libbb: sockaddr2str: ensure only printable characters are
returned for the hostname part
CVE: CVE-2022-28391
Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
Tested-by: Radoslav Kolev <radoslav.kolev@suse.com>
Backport from ML: http://lists.busybox.net/pipermail/busybox/2022-July/089796.html
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
---
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);*/
}
--
2.48.1