Package: release.debian.org Severity: normal Tags: stretch User: release.debian....@packages.debian.org Usertags: pu
Hi SRMs, There's a chance that on some signals (including, but not limited to SIGSEGV) socat goes to an infinite loop and consume all CPU cycles. Upstream patched it[1] for 1.7.3.2 release, which is in Sid. Basically set 'diag_immediate_exit' in the signal handling function to let it exit. Full debdiff is attached. Thanks for considering, Laszlo/GCS [1] http://repo.or.cz/socat.git/commitdiff/6b596b8852d8fad2675894e3ceb18a04801eaf23?hp=d34493c18df0a4d0c4fdb5bda74a155ce13e4ccf
diff -Nru socat-1.7.3.1/debian/changelog socat-1.7.3.1/debian/changelog --- socat-1.7.3.1/debian/changelog 2016-11-24 22:47:30.000000000 +0000 +++ socat-1.7.3.1/debian/changelog 2017-07-14 13:52:03.000000000 +0000 @@ -1,3 +1,10 @@ +socat (1.7.3.1-2+deb9u1) stretch; urgency=medium + + * Backport upstream fix for SIGSEGV and other signals could lead to a + 100% CPU loop. + + -- Laszlo Boszormenyi (GCS) <g...@debian.org> Fri, 14 Jul 2017 13:52:03 +0000 + socat (1.7.3.1-2) unstable; urgency=low * Backport upstream fix to build with OpenSSL 1.1.0 (closes: #828550). diff -Nru socat-1.7.3.1/debian/patches/08-signals_could_lead_CPU_loop.patch socat-1.7.3.1/debian/patches/08-signals_could_lead_CPU_loop.patch --- socat-1.7.3.1/debian/patches/08-signals_could_lead_CPU_loop.patch 1970-01-01 00:00:00.000000000 +0000 +++ socat-1.7.3.1/debian/patches/08-signals_could_lead_CPU_loop.patch 2017-07-14 13:52:03.000000000 +0000 @@ -0,0 +1,43 @@ +From 6b596b8852d8fad2675894e3ceb18a04801eaf23 Mon Sep 17 00:00:00 2001 +From: Gerhard Rieger <gerh...@dest-unreach.org> +Date: Wed, 11 May 2016 20:34:33 +0200 +Subject: [PATCH 1/1] SIGSEGV and other signals could lead to a 100% CPU loop + +--- + CHANGES | 3 +++ + socat.c | 3 ++- + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/CHANGES b/CHANGES +index ee15bd0..1e1bc5d 100644 +--- a/CHANGES ++++ b/CHANGES +@@ -1,3 +1,6 @@ ++corrections: ++ SIGSEGV and other signals could lead to a 100% CPU loop ++ + porting: + Changes to make socat compile with OpenSSL 1.1. + Thanks to Sebastian Andrzej Siewior e.a. from the Debian team for +diff --git a/socat.c b/socat.c +index 09039ff..ace006d 100644 +--- a/socat.c ++++ b/socat.c +@@ -1422,12 +1422,13 @@ void socat_signal(int signum) { + diag_in_handler = 1; + Notice1("socat_signal(): handling signal %d", signum); + switch (signum) { +- case SIGQUIT: + case SIGILL: + case SIGABRT: + case SIGBUS: + case SIGFPE: + case SIGSEGV: ++ diag_immediate_exit = 1; ++ case SIGQUIT: + case SIGPIPE: + diag_set_int('x', 128+signum); /* in case Error exits for us */ + Error1("exiting on signal %d", signum); +-- +2.7.4.GIT + diff -Nru socat-1.7.3.1/debian/patches/series socat-1.7.3.1/debian/patches/series --- socat-1.7.3.1/debian/patches/series 2016-11-24 22:47:30.000000000 +0000 +++ socat-1.7.3.1/debian/patches/series 2017-07-14 13:52:03.000000000 +0000 @@ -6,3 +6,4 @@ 05-xio-ip.patch 06-socat.1.patch 07-openssl-1.1.patch +08-signals_could_lead_CPU_loop.patch