Bug 17459 - fetchmail-5.4.3-4 segfaults under runsocks-1.0r10-5
Summary: fetchmail-5.4.3-4 segfaults under runsocks-1.0r10-5
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: fetchmail
Version: 1.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nalin Dahyabhai
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-09-13 00:37 UTC by dunwoody
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2000-09-13 00:37:38 UTC
Embargoed:


Attachments (Terms of Use)

Description dunwoody 2000-09-13 00:37:37 UTC
On my Rawhide 20000811 system, fetchmail-5.4.3-4 segfaults under
runsocks-1.0r10-5.
Downgrading to fetchmail-5.3.0-1 solves the problem.  I notice that going
from fetchmail-5.3 to
fetchmail-5.4,  additional crypto libraries are used, including kerberos;
not sure if that's relevant.

This could very well be a runsocks problem, though I haven't had problems
using runsocks-1.0r10-5
with other apps, including telnet and cvs.

More details:

dunwoody2:/1> rpm -q runsocks
runsocks-1.0r10-5
dunwoody2:/1> rpm -q fetchmail
fetchmail-5.3.0-1
dunwoody2:/1> cat .fetchmailrc
set postmaster "dunwoody"
set daemon 60
poll 24.0.0.70 with proto POP3
user "dunwoody" there with password "*****" is dunwoody here options
fetchall
dunwoody2:/1> ldd /usr/bin/fetchmail
	libcrypt.so.1 => /lib/libcrypt.so.1 (0x4001d000)
	libresolv.so.2 => /lib/libresolv.so.2 (0x4004a000)
	libc.so.6 => /lib/libc.so.6 (0x4005c000)
	/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
dunwoody2:/1> runsocks fetchmail -vN
fetchmail: starting fetchmail 5.3.0 daemon 
fetchmail: 5.3.0 querying 24.0.0.70 (protocol POP3) at Tue, 12 Sep 2000
17:19:08 -0700 (PDT)
fetchmail: POP3< +OK InterMail POP3 server ready.
fetchmail: POP3> USER dunwoody
fetchmail: POP3< +OK please send PASS command
fetchmail: POP3> PASS *
fetchmail: POP3< +OK dunwoody is welcome here
fetchmail: POP3> STAT
fetchmail: POP3< +OK 0 0
fetchmail: No mail for dunwoody at 24.0.0.70
fetchmail: POP3> QUIT
fetchmail: POP3< +OK dunwoody InterMail POP3 server signing off.
fetchmail: fetchmail: sleeping at Tue, 12 Sep 2000 17:19:11 -0700 (PDT)
^C
fetchmail: terminated with signal 2
dunwoody2:/1> ... rpm -Uvh /1/pkg/nrpm/fetchmail-5.4.3-4.i386.rpm 
fetchmail                  
##################################################
dunwoody2:/1> ldd /usr/bin/fetchmail
	libkrb4.so.2 => /usr/kerberos/lib/libkrb4.so.2 (0x4001d000)
	libdes425.so.3 => /usr/kerberos/lib/libdes425.so.3 (0x40034000)
	libcrypt.so.1 => /lib/libcrypt.so.1 (0x40039000)
	libresolv.so.2 => /lib/libresolv.so.2 (0x40066000)
	libkrb5.so.3 => /usr/kerberos/lib/libkrb5.so.3 (0x40078000)
	libk5crypto.so.3 => /usr/kerberos/lib/libk5crypto.so.3 (0x400e0000)
	libcom_err.so.3 => /usr/kerberos/lib/libcom_err.so.3 (0x400f5000)
	libgssapi_krb5.so.2 => /usr/kerberos/lib/libgssapi_krb5.so.2 (0x400f7000)
	libc.so.6 => /lib/libc.so.6 (0x4010c000)
	/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
dunwoody2:/1> runsocks fetchmail -vN
Segmentation fault
dunwoody2:/1> fetchmail -vN
fetchmail: starting fetchmail 5.4.3 daemon 
fetchmail: 5.4.3 querying 24.0.0.70 (protocol POP3) at Tue, 12 Sep 2000
17:22:22 -0700 (PDT)
fetchmail: Query status=2 (SOCKET)
fetchmail: fetchmail: sleeping at Tue, 12 Sep 2000 17:22:25 -0700 (PDT)
^C
fetchmail: terminated with signal 2
dunwoody2:/1> export LD_PRELOAD=libsocks5_sh.so
dunwoody2:/1> gdb /usr/bin/fetchmail
GNU gdb 5.0
Copyright 2000 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 "i386-redhat-linux"...
(no debugging symbols found)...
(gdb) r -vN
Starting program: /usr/bin/fetchmail -vN

Program received signal SIGSEGV, Segmentation fault.
0x40023836 in HostentCopy () from /usr/lib/libsocks5_sh.so
(gdb) bt
#0  0x40023836 in HostentCopy () from /usr/lib/libsocks5_sh.so
#1  0x40023be0 in gethostbyname () from /usr/lib/libsocks5_sh.so
#2  0x8052b77 in strcpy () at ../sysdeps/generic/strcpy.c:31
#3  0x8050f39 in strcpy () at ../sysdeps/generic/strcpy.c:31
#4  0x40146665 in __libc_start_main (main=0x8050d80 <strcpy+26060>, argc=2, 
    ubp_av=0xbffffac4, init=0x8049e64, fini=0x806283c <strcpy+98440>, 
    rtld_fini=0x4000dca4 <_dl_fini>, stack_end=0xbffffabc)
    at ../sysdeps/generic/libc-start.c:111
(gdb) q
The program is running.  Exit anyway? (y or n) y
dunwoody2:/1>

Comment 1 Nalin Dahyabhai 2000-09-13 15:53:13 UTC
The 5.5.0 package from the build tree appears to work correctly if you rebuild
the socks5 package:

env LD_PRELOAD=`pwd`/libsocks5_sh.so gdb /usr/bin/fetchmail

(gdb) run -vN blade
Starting program: /usr/bin/fetchmail -vN blade
Enter password for root@blade: 
fetchmail: 5.5.0 querying blade (protocol auto) at Wed, 13 Sep 2000 11:52:02
-0400 (EDT)
fetchmail: 5.5.0 querying blade (protocol IMAP) at Wed, 13 Sep 2000 11:52:02
-0400 (EDT)
fetchmail: IMAP< * OK blade.devel.redhat.com IMAP4rev1 v12.264 server ready
fetchmail: IMAP> A0001 CAPABILITY
fetchmail: IMAP< * CAPABILITY IMAP4 IMAP4REV1 NAMESPACE IDLE SCAN SORT
MAILBOX-REFERRALS LOGIN-REFERRALS AUTH=GSSAPI AUTH=LOGIN THREAD=ORDEREDSUBJECT
fetchmail: IMAP< A0001 OK CAPABILITY completed
fetchmail: IMAP> A0002 LOGIN "root" "*"
fetchmail: IMAP< A0002 NO LOGIN failed
fetchmail: Authorization failure on root.redhat.com
fetchmail: IMAP> A0003 LOGOUT
fetchmail: IMAP< * BYE blade.devel.redhat.com IMAP4rev1 server terminating
connection
fetchmail: IMAP< A0003 OK LOGOUT completed
fetchmail: authorization error while fetching from blade
fetchmail: Query status=3 (AUTHFAIL)
fetchmail: normal termination, status 3

Program exited with code 03.
(gdb) 

The NEWS file distributed with fetchmail mentions nothing about changes for
SOCKS support, so I suspect you just need to rebuild the socks5 package.

Comment 2 dunwoody 2000-10-14 21:06:07 UTC
I just installed fetchmail-5.5.0-2, and it works fine with runsocks-1.0r10-5, so
it now works for me, too.


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