Debian Bug report logs - #354855
mysterious SIGALRM block due to wrong sigsetjmp 2nd argument

version graph

Package: tcp-wrappers; Maintainer for tcp-wrappers is Marco d'Itri <md@linux.it>;

Reported by: Ian Jackson <iwj@ubuntu.com>

Date: Wed, 1 Mar 2006 15:48:17 UTC

Severity: important

Tags: patch

Found in version tcp-wrappers/7.6.dbs-8

Fixed in version tcp-wrappers/7.6.dbs-9

Done: Marco d'Itri <md@linux.it>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Anthony Towns <ajt@debian.org>:
Bug#354855; Package tcp-wrappers. (full text, mbox, link).


Acknowledgement sent to Ian Jackson <iwj@ubuntu.com>:
New Bug report received and forwarded. Copy sent to Anthony Towns <ajt@debian.org>. (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Ian Jackson <iwj@ubuntu.com>
To: submit@bugs.debian.org
Subject: mysterious SIGALRM block due to wrong sigsetjmp 2nd argument
Date: Wed, 1 Mar 2006 15:32:15 +0000
Package: tcp-wrappers
Version: 7.6.dbs-8
Severity: important
Tags: patch

The attached change /actually fixes/ the blocked-SIGALRM bug rather
than specifically insisting that the program must have that bug !
(See the documentation for sigsetjmp, for example at
 http://www.opengroup.org/onlinepubs/009695399/functions/sigsetjmp.html)

I have confirmed that this change fixes the bug and as you can see
with my Ubuntu hat on I have just uploaded it there.  It should be
included in Debian too; if possible, this change should be included in
a future stable update.  Apologies for the unfortunate form of the
patch (a diffed diff); this is because of dbs.

I have set the severity `important' because there is evidence (from
google) that others are affected, because it's so hard otherwise to
track down, and of course because the consequences of the problem are
sometimes bizarre and certainly not limited to the immediate scope of
tcpd.  I hope that decision meets with your approval.

Thanks,
Ian.

diff -u tcp-wrappers-7.6.dbs/debian/changelog tcp-wrappers-7.6.dbs/debian/changelog
--- tcp-wrappers-7.6.dbs/debian/changelog
+++ tcp-wrappers-7.6.dbs/debian/changelog
@@ -1,3 +1,13 @@
+tcp-wrappers (7.6.dbs-8ubuntu1) dapper; urgency=low
+
+  * tcpd actually passes nonzero 2nd argument to sigsetjmp.  Otherwise
+    it does the same as setjmp.  (Why oh why was this bug there at all??)
+    This fixes a bizarre bug where if your ident (RFC931/RFC1413) lookup
+    times out due to a stupid firewall, your service - eg, your ssh shell
+    session - ends up with SIGALRM blocked.
+
+ -- Ian Jackson <iwj@ubuntu.com>  Wed,  1 Mar 2006 15:09:48 +0000
+
 tcp-wrappers (7.6.dbs-8) unstable; urgency=medium
 
   * Fixed postinst to source /usr/share/debconf/confmodule at top level, or
diff -u tcp-wrappers-7.6.dbs/debian/patches/siglongjmp tcp-wrappers-7.6.dbs/debian/patches/siglongjmp
--- tcp-wrappers-7.6.dbs/debian/patches/siglongjmp
+++ tcp-wrappers-7.6.dbs/debian/patches/siglongjmp
@@ -24,7 +24,7 @@
  	 */
  
 -	if (setjmp(timebuf) == 0) {
-+	if (sigsetjmp(timebuf, 0) == 0) {
++	if (sigsetjmp(timebuf, 1) == 0) {
  	    /* Save SIGALRM timer and handler. Sudheer Abdul-Salam, SUN. */
  	    saved_timeout = alarm(0);
  	    nact.sa_handler = timeout;

-- 
Ian Jackson, at home.           Local/personal: ijackson@chiark.greenend.org.uk
ian@davenant.greenend.org.uk       http://www.chiark.greenend.org.uk/~ijackson/
Problems mailing me ?  Send postmaster@chiark the bounce (bypasses the blocks).



Information forwarded to debian-bugs-dist@lists.debian.org, Anthony Towns <ajt@debian.org>:
Bug#354855; Package tcp-wrappers. (full text, mbox, link).


Acknowledgement sent to md@Linux.IT (Marco d'Itri):
Extra info received and forwarded to list. Copy sent to Anthony Towns <ajt@debian.org>. (full text, mbox, link).


Message #10 received at 354855@bugs.debian.org (full text, mbox, reply):

From: md@Linux.IT (Marco d'Itri)
To: Ian Jackson <iwj@ubuntu.com>, 354855@bugs.debian.org
Subject: Re: Bug#354855: mysterious SIGALRM block due to wrong sigsetjmp 2nd argument
Date: Wed, 1 Mar 2006 19:16:27 +0100
[Message part 1 (text/plain, inline)]
On Mar 01, Ian Jackson <iwj@ubuntu.com> wrote:

> +  * tcpd actually passes nonzero 2nd argument to sigsetjmp.  Otherwise
> +    it does the same as setjmp.  (Why oh why was this bug there at all??)
The clue may be in the rationale section of the opengroup documentation,
maybe libc5 (4?) had the BSD behaviour which always saved the signals.
I will upload a fixed package in one or two days, thank you for the
patch.

-- 
ciao,
Marco
[signature.asc (application/pgp-signature, inline)]

Reply sent to Marco d'Itri <md@linux.it>:
You have taken responsibility. (full text, mbox, link).


Notification sent to Ian Jackson <iwj@ubuntu.com>:
Bug acknowledged by developer. (full text, mbox, link).


Message #15 received at 354855-close@bugs.debian.org (full text, mbox, reply):

From: Marco d'Itri <md@linux.it>
To: 354855-close@bugs.debian.org
Subject: Bug#354855: fixed in tcp-wrappers 7.6.dbs-9
Date: Wed, 01 Mar 2006 15:17:18 -0800
Source: tcp-wrappers
Source-Version: 7.6.dbs-9

We believe that the bug you reported is fixed in the latest version of
tcp-wrappers, which is due to be installed in the Debian FTP archive:

libwrap0-dev_7.6.dbs-9_i386.deb
  to pool/main/t/tcp-wrappers/libwrap0-dev_7.6.dbs-9_i386.deb
libwrap0_7.6.dbs-9_i386.deb
  to pool/main/t/tcp-wrappers/libwrap0_7.6.dbs-9_i386.deb
tcp-wrappers_7.6.dbs-9.diff.gz
  to pool/main/t/tcp-wrappers/tcp-wrappers_7.6.dbs-9.diff.gz
tcp-wrappers_7.6.dbs-9.dsc
  to pool/main/t/tcp-wrappers/tcp-wrappers_7.6.dbs-9.dsc
tcpd_7.6.dbs-9_i386.deb
  to pool/main/t/tcp-wrappers/tcpd_7.6.dbs-9_i386.deb



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 354855@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Marco d'Itri <md@linux.it> (supplier of updated tcp-wrappers 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 ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Thu,  2 Mar 2006 00:01:59 +0100
Source: tcp-wrappers
Binary: libwrap0 tcpd libwrap0-dev
Architecture: source i386
Version: 7.6.dbs-9
Distribution: unstable
Urgency: low
Maintainer: Anthony Towns <ajt@debian.org>
Changed-By: Marco d'Itri <md@linux.it>
Description: 
 libwrap0   - Wietse Venema's TCP wrappers library
 libwrap0-dev - Wietse Venema's TCP wrappers library, development files
 tcpd       - Wietse Venema's TCP wrapper utilities
Closes: 17798 320320 333495 344127 348442 354855
Changes: 
 tcp-wrappers (7.6.dbs-9) unstable; urgency=low
 .
   * Updated patch siglongjmp: actually save the signals mask on jumps
     to prevent blocking SIGALRM on unsuspecting calling programs.
     Fix contributed by Ian Jackson of Ubuntu. (Closes: #354855)
   * Updated patch sig_fix with a fix from the Red Hat package.
   * New patch aclexec: adds the aclexec command and its documentation.
     (Closes: #17798)
   * New patch 01_man_typos: fixes some man pages typos. (Closes: #344127)
   * New patch fix_warnings: fixes misc compilation warnings.
   * New debconf translations: pt, sv, vi. (Closes: #348442, #333495, #320320)
Files: 
 08d8bc1e477d3e527df84b4c19a73903 680 base important tcp-wrappers_7.6.dbs-9.dsc
 86929664ebfbbf8d5659704f3e7ff887 49577 base important tcp-wrappers_7.6.dbs-9.diff.gz
 cd9a9523ea2accfde47df7e44ef9626c 75688 base important tcpd_7.6.dbs-9_i386.deb
 02c2ae1275c2b2f9f0c5d3bf43ad8730 28532 base important libwrap0_7.6.dbs-9_i386.deb
 da819b514588fc7fd654533b97e465d3 33756 libdevel optional libwrap0-dev_7.6.dbs-9_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFEBigeFGfw2OHuP7ERAhinAJ0ZGyYxfoghTFfASpkF+0tCVIi6BgCfaFDa
mKkSAOngYpX9JrOQtLn8hB8=
=jSm9
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 25 Jun 2007 22:47:35 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Mar 25 17:42:00 2023; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.