----- Forwarded message from Harri Kiiskinen harri.kiiskinen@utu.fi -----
Date: Mon, 30 Aug 2010 13:26:07 +0300 From: Harri Kiiskinen harri.kiiskinen@utu.fi To: Debian Bug Tracking System submit@bugs.debian.org Subject: Bug#594876: stunnel4: Fails to connect, "Input line too long"
Package: stunnel4 Version: 3:4.29-1local1 Severity: normal
My Univ. recently updated their mail servers, and I could not read my mails anymore with Emacs/mew, that uses stunnel4 for encryption. It turned out the reason was, that the server responded with this string:
* OK [CAPABILITY STARTTLS CAPABILITY IMAP4 IMAP4rev1 ACL QUOTA LITERAL+ NAMESPACE UIDPLUS CHILDREN BINARY UNSELECT SORT LANGUAGE IDLE XSENDER X-NETSCAPE XSERVERINFO X-SUN-SORT X-SUN-IMAP X-ANNOTATEMORE X-UNAUTHENTICATE XUM1 AUTH=PLAIN AUTH=PLAIN] Messaging Multiplexor (Sun Java(tm) System Messaging Server 7.3-11.01 (built Sep 1 2009))
It turned out that this was way much longer than what stunnel4 expects. In common.h, one finds
#define STRLEN 256
When this is changed to
#define STRLEN 512
and the package recompiled, everything works well.
Perhaps the length of accepted strings should be increased? Or is this long a response against some standard?
All the best,
Harri K.
-- System Information: Debian Release: squeeze/sid APT prefers testing APT policy: (990, 'testing') Architecture: i386 (i686)
Kernel: Linux 2.6.32-3-686 (SMP w/1 CPU core) Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash
Versions of packages stunnel4 depends on: ii adduser 3.112 add and remove users and groups ii libc6 2.11.2-2 Embedded GNU C Library: Shared lib ii libssl0.9.8 0.9.8o-1 SSL shared libraries ii libwrap0 7.6.q-19 Wietse Venema's TCP wrappers libra ii netbase 4.42 Basic TCP/IP networking system ii openssl 0.9.8o-1 Secure Socket Layer (SSL) binary a ii perl-modules 5.10.1-14 Core Perl modules
stunnel4 recommends no packages.
Versions of packages stunnel4 suggests: pn logcheck-database <none> (no description available)
-- Configuration Files: /etc/stunnel/stunnel.conf changed [not included]
-- no debconf information
----- End forwarded message -----
Harri Kiiskinen wrote:
#define STRLEN 256 When this is changed to #define STRLEN 512 and the package recompiled, everything works well.
Perhaps the length of accepted strings should be increased? Or is this long a response against some standard?
I'm afraid there is no single good value for STRLEN. Smaller values break some configurations while larger ones increase required CPU stack size. The solution I'm going to implement is to switch programming language from C to C++ and implement dynamic strings. That's my plan for stunnel 5.x.
Mike