Your message dated Sat, 06 Jan 2024 08:57:50 +0000
with message-id <[email protected]>
and subject line Bug#1060110: fixed in socat 1.8.0.0-4
has caused the Debian Bug report #1060110,
regarding FTBFS: buffer overflow in test
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1060110: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1060110
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: socat
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu noble ubuntu-patch
Dear Maintainer,
A buffer overrun in msg2() was observed when executing the HOSTNAMEOVFL
test:
https://launchpadlibrarian.net/704617807/buildlog_ubuntu-noble-ppc64el.socat_1.8.0.0-3_BUILDING.txt.gz
* Fix memory overflow (LP: #2048408)
d/p/error.c-buffer-overflow-in-msg2.patch
Thanks for considering the patch.
Best regards
Heinrich
diff -Nru socat-1.8.0.0/debian/patches/error.c-buffer-overflow-in-msg2.patch
socat-1.8.0.0/debian/patches/error.c-buffer-overflow-in-msg2.patch
--- socat-1.8.0.0/debian/patches/error.c-buffer-overflow-in-msg2.patch
1970-01-01 01:00:00.000000000 +0100
+++ socat-1.8.0.0/debian/patches/error.c-buffer-overflow-in-msg2.patch
2024-01-06 00:03:50.000000000 +0100
@@ -0,0 +1,35 @@
+From: Heinrich Schuchardt <[email protected]>
+Date: Fri, 5 Jan 2024 21:20:26 +0000
+Subject: [PATCH 1/1] error.c: buffer overflow in msg2()
+
+A buffer overrun in msg2() was observed when executing the HOSTNAMEOVFL
+test.
+
+If strncpy() truncates a string it does not append a terminating NUL
+character. Insert a NUL character after the destination area.
+This ensures that strchr() will stop at the end of the string.
+
+Fixes: 9be423ceea3c ("Improved handling of very long host or program names, or
no strftime")
+Signed-off-by: Heinrich Schuchardt <[email protected]>
+
+Forwarded: yes
+Last-Update: 2024-01-05
+---
+ error.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/error.c b/error.c
+index d0a2a9e..3435046 100644
+--- a/error.c
++++ b/error.c
+@@ -404,6 +404,7 @@ void msg2(
+ if (bufp < buff+MSGLEN)
+ *bufp++ = ' ';
+ strncpy(bufp, text, MSGLEN-(bufp-buff));
++ bufp[MSGLEN-(bufp-buff)] = 0;
+ bufp = strchr(bufp, '\0');
+ strcpy(bufp, "\n");
+ _msg(level, buff, syslp);
+--
+2.43.0
+
diff -Nru socat-1.8.0.0/debian/patches/series
socat-1.8.0.0/debian/patches/series
--- socat-1.8.0.0/debian/patches/series 2023-12-21 13:58:31.000000000 +0100
+++ socat-1.8.0.0/debian/patches/series 2024-01-06 00:04:02.000000000 +0100
@@ -5,3 +5,4 @@
07-compat-define-PATH_MAX.patch
08-test.sh-fixes.patch
09-xioinitialize.c.patch
+error.c-buffer-overflow-in-msg2.patch
--- End Message ---
--- Begin Message ---
Source: socat
Source-Version: 1.8.0.0-4
Done: Laszlo Boszormenyi (GCS) <[email protected]>
We believe that the bug you reported is fixed in the latest version of
socat, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Laszlo Boszormenyi (GCS) <[email protected]> (supplier of updated socat package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Sat, 06 Jan 2024 08:47:44 +0100
Source: socat
Architecture: source
Version: 1.8.0.0-4
Distribution: unstable
Urgency: medium
Maintainer: Laszlo Boszormenyi (GCS) <[email protected]>
Changed-By: Laszlo Boszormenyi (GCS) <[email protected]>
Closes: 1060110
Changes:
socat (1.8.0.0-4) unstable; urgency=medium
.
* Disable remaining tests for not working on buildds.
.
[ Heinrich Schuchardt <[email protected]> ]
* Fix memory overflow (LP: #2048408) (closes: #1060110).
Checksums-Sha1:
2b666bf6e5262162b09bc172e48343163ef4f40d 1854 socat_1.8.0.0-4.dsc
65f68f8e4ab05984bb6a540825ea3db4d4311a19 15472 socat_1.8.0.0-4.debian.tar.xz
Checksums-Sha256:
b54583e4e15037234abbbfc410d44913d674b001e9502eeebac4e94d374b9e83 1854
socat_1.8.0.0-4.dsc
21fafb4f6bc76d8c6564f78c5cb9ec0611349e93d2f70ad73e143aea854e6b75 15472
socat_1.8.0.0-4.debian.tar.xz
Files:
ebf5b49c7f11d936c0dbc96c499066d5 1854 net optional socat_1.8.0.0-4.dsc
4768addcb699cbbd7b8498655e55b618 15472 net optional
socat_1.8.0.0-4.debian.tar.xz
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEfYh9yLp7u6e4NeO63OMQ54ZMyL8FAmWZEBkACgkQ3OMQ54ZM
yL+8ng/+LHgTAkKR7PLNTT/I8B4mA9MdMZIKXkihT7WzyvkymQ9jhB3ct98BeSuq
ojMefvjcjLv47kKXSsxCEHz0Obxa/3DqImtI5EBBwuGhP27CR2arSewu9K+K36m7
U7Z7sV6M8Lu0sF3G8SAs92m8YTpNkvPWZDEoghGdVcOyR59m3DRtAPDxBw6Uu5Cm
d1avQof4MFOpHRg5oFGEfDc8n/TtXYg7oKRhev005uUcsyJudci/BaE4lRpbsy65
A0lcG/ZURBt5E+rn/NxmYOcdLnNHfjylAxQMp8yVnhZLiOIfZMY5a8MFOqyc8cXT
FDzNlU0DQs60/utLT1LAUojEpCSz7XqUSYVDIBKGhWqdFq7cG16j5I/rpikrxGrM
JzAps4wcnzIG2nyA7eziG9VwWes8Lm+i+OsPhWSu6xjsjXuzIgXmb7Gk/vTojfW6
M1vmmlc9cger2tJiVUT0toqxkhSWKl4tHNlZepeAJzbjd8ZRB1nOj/REJBMm231P
K94nzFshaSNYwD8eWeDOeDnwoeDXTDOxepDcL6EZJXT3FEtyDhN46SNV5QyZs4Ex
CDLKPZxWHTzZuuI/7V84MCu3pd8xMM3bKP3pG4uFAYuhG1kRQpK+vyhsp0oSgFax
b/UP7a2IITAQMp1InhklsdcBqh8xSKLN0975laS5vcG3+RzQ5cg=
=6IDi
-----END PGP SIGNATURE-----
--- End Message ---