Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Jun 2001 17:22:02 -0500
From:      "Michael C. Urban" <murban@tznet.com>
To:        freebsd-current@freebsd.org
Subject:   Bug in CURRENT's ioctl function?
Message-ID:  <20010630172202.A7799@kiara.simbalink.org>

next in thread | raw e-mail | index | archive | help
I was trying to run AOL Server 3.4 on FreeBSD 5.0-CURRENT. The server
will run on a non-privilaged port, but will segfault on port 80 or any
other privilaged port. This behavior does not occur on FreeBSD 4.3.
The idea is that the server starts as root, binds to port 80, and then
suid's to a normal user. I have already gone through the AOL Server
source and also run this problem past users on the AOL Server mailing
list.  I have attempted to run AOL Server 3.4 on two different CURRENT
boxes. One was last updated in March, and the other was updated just 3
days ago. Both had the same problem.

Here is the gdb output when attempting to run on port 80:

[25/Jun/2001:16:30:13][15486.135540736][-main-] Notice: binder: 
listen(205.216.111.20,80) = 15
[25/Jun/2001:16:30:13][15486.135540736][-main-] Notice: nssock:
listening on 205.216.111.20

Program received signal SIGSEGV, Segmentation fault.
0x281820ff in ioctl () from /usr/lib/libc_r.so.5

(gdb) bt
#0  0x281820ff in ioctl () from /usr/lib/libc_r.so.5
#1  0x80805df in Ns_SockSetNonBlocking (sock=15) at sock.c:385
#2  0x2824551a in SockStart (server=0x8145560 "server1",  
    label=0x8145b10 "nssock", drvDataPtr=0x8171208) at sock.cpp:474
#3  0x806e326 in NsStartDrivers (server=0x8145560 "server1") at
	drv.c:225
#4  0x8077491 in Ns_Main (argc=8, argv=0xbfbffadc, 
	    initProc=0x807445c <ServerInit>) at nsmain.c:697
#5  0x8074448 in main (argc=8, argv=0xbfbffadc) at
	main.c:64
#6  0x805ae7f in _start ()
(gdb)

It seems it binds to port 80 but than segfaults as soon as it switched
to a non-root user. This problem does not occur on non-privilaged
ports above 1024, nor does it occur on FreeBSD 4.3 on any ports.

Anyone have any ideas on what might be causing this?

Thanks,

Mike

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010630172202.A7799>