From 9ee701c5ae3898411f6f48383f698677f2fc65dc Mon Sep 17 00:00:00 2001 From: eaglegai Date: Mon, 1 Dec 2025 19:27:54 +0800 Subject: [PATCH] sync to fixed telnet crashes on stack overflow due to infinite recursion --- telnet-rh1895387.patch | 15 +++++++++++++++ telnet.spec | 9 ++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 telnet-rh1895387.patch diff --git a/telnet-rh1895387.patch b/telnet-rh1895387.patch new file mode 100644 index 0000000..1570ab0 --- /dev/null +++ b/telnet-rh1895387.patch @@ -0,0 +1,15 @@ +diff --git a/telnet/sys_bsd.c.old b/telnet/sys_bsd.c +index 9e05171..39845ac 100644 +--- a/telnet/sys_bsd.c.old ++++ b/telnet/sys_bsd.c +@@ -833,6 +833,10 @@ NetSetPgrp(int fd) + void + deadpeer(int sig) + { ++ if(sig == SIGPIPE) { ++ signal(SIGPIPE, SIG_DFL); ++ fprintf(stderr, "Broken pipe\n"); ++ } + (void)sig; + setcommandmode(); + siglongjmp(peerdied, -1); diff --git a/telnet.spec b/telnet.spec index 5b58650..900bb90 100644 --- a/telnet.spec +++ b/telnet.spec @@ -1,7 +1,7 @@ Name: telnet Epoch: 1 Version: 0.17 -Release: 79 +Release: 80 Summary: Client and Server programs for the Telnet communication protocol License: BSD Url: http://web.archive.org/web/20070819111735/www.hcs.harvard.edu/~dholland/computers/old-netkit.html @@ -38,6 +38,7 @@ Patch0025: netkit-telnet-0.17-manpage.patch Patch0026: netkit-telnet-0.17-telnetrc.patch Patch0027: CVE-2020-10188.patch Patch0028: backport-CVE-2022-39028.patch +Patch0029: telnet-rh1895387.patch BuildRequires: gcc-c++ ncurses-devel systemd Requires: systemd @@ -101,6 +102,12 @@ install -pm644 %{SOURCE3} %{buildroot}%{_unitdir}/telnet.socket %{_mandir}/man1/telnet.1* %changelog +* Tue Dec 02 2025 gaihuiying - 1:0.17-80 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:Fix telnet crashes on stack overflow due to infinite recursion. + * Mon Apr 01 2024 gaihuiying - 1:0.17-79 - Type:cves - CVE:CVE-2022-39028 -- Gitee