Bug 179236 - Stunnel segfaults on x86_64 when connecting to a server
Stunnel segfaults on x86_64 when connecting to a server
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: stunnel (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Miloslav Trmač
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-01-28 13:37 EST by Aleksander Adamowski
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version: 4.14-3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-01-30 19:20:20 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Aleksander Adamowski 2006-01-28 13:37:02 EST
Description of problem:

I'm starting stunnel using the following config file:

client = yes
foreground = yes
debug = debug
pid = /var/run/stunnel/backup_tism.pid
setgid = daemon
setuid = stunnel
[service]
accept = 127.0.0.1:1500
connect = serveraddress:1600

When I try to connect to 127.0.0.1:1500, stunnel segfaults.

GDB shows this:
# gdb stunnel
GNU gdb Red Hat Linux (6.3.0.0-1.94rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu"...Using host libthread_db
library "/lib64/libthread_db.so.1".

(gdb) run /etc/stunnel/backup-tism.conf
Starting program: /usr/sbin/stunnel /etc/stunnel/backup-tism.conf
2006.01.28 19:36:55 LOG5[10891:1]: stunnel 4.14 on x86_64-redhat-linux-gnu
UCONTEXT+POLL+IPv6+LIBWRAP with OpenSSL 0.9.8a 11 Oct 2005
2006.01.28 19:36:55 LOG7[10891:1]: Snagged 64 random bytes from /root/.rnd
2006.01.28 19:36:55 LOG7[10891:1]: Wrote 1024 new random bytes to /root/.rnd
2006.01.28 19:36:55 LOG7[10891:1]: RAND_status claims sufficient entropy for the
PRNG
2006.01.28 19:36:55 LOG6[10891:1]: PRNG seeded successfully
2006.01.28 19:36:55 LOG6[10891:1]: file ulimit = 1024 (can be changed with
'ulimit -n')
2006.01.28 19:36:55 LOG6[10891:1]: poll() used - no FD_SETSIZE limit for file
descriptors
2006.01.28 19:36:55 LOG5[10891:1]: 500 clients allowed
2006.01.28 19:36:55 LOG7[10891:1]: FD 6 in non-blocking mode
2006.01.28 19:36:55 LOG7[10891:1]: FD 7 in non-blocking mode
2006.01.28 19:36:55 LOG7[10891:1]: FD 8 in non-blocking mode
2006.01.28 19:36:55 LOG7[10891:1]: SO_REUSEADDR option set on accept socket
2006.01.28 19:36:55 LOG7[10891:1]: tism bound to 127.0.0.1:1500
2006.01.28 19:36:55 LOG7[10891:1]: Created pid file /var/run/stunnel/backup_tism.pid
2006.01.28 19:36:55 LOG7[10891:0]: Waiting -1 second(s) for 2 file descriptor(s)
2006.01.28 19:36:59 LOG7[10891:0]: CONTEXT 1, FD=6, (IN)->()
2006.01.28 19:36:59 LOG7[10891:0]: CONTEXT 1, FD=8, (IN)->(IN)
2006.01.28 19:36:59 LOG7[10891:1]: tism accepted FD=9 from 127.0.0.1:51315
2006.01.28 19:36:59 LOG7[10891:1]: Creating a new context
2006.01.28 19:36:59 LOG7[10891:1]: Context 2 created
2006.01.28 19:36:59 LOG7[10891:2]: Context swap: 1 -> 2

Program received signal SIGSEGV, Segmentation fault.
client (arg=Variable "arg" is not available.
) at client.c:106
106         s_log(LOG_DEBUG, "%s started", c->opt->servname);
(gdb) bt
#0  client (arg=Variable "arg" is not available.
) at client.c:106
#1  0x00002aaaab4c9e50 in __correctly_grouped_prefixwc () from /lib64/libc.so.6
#2  0x0000000000000000 in ?? ()




Version-Release number of selected component (if applicable): 4.14 on
x86_64-redhat-linux-gnu UCONTEXT+POLL+IPv6+LIBWRAP with OpenSSL 0.9.8a 11 Oct 2005


How reproducible: always
Comment 1 Miloslav Trmač 2006-01-30 19:20:20 EST
(stunnel ucontext threading uses makecontext to pass a pointer argument, which
isn't portable and isn't supported by x86_64 glibc).

Should be fixed in rawhide stunnel-4.14-3.  Thanks for your report.

Note You need to log in before you can comment on or make changes to this bug.