Subject: signal 11 error, virtual ftp, "ftp" v "anon" login.

From: Edmund Roche-Kelly <[email-masked]>
Date: Fri, 07 Feb 97 01:16:48 +0000

Hi,

I'm trying to set up Virtual Hosts on a FreeBSD box.
I've already got it running on another FreeBSD box,
but I've run into a problem which I'm sure is 
a stupid configuration error, but I just can't see it.

Anyway -

Problem:

When you ftp to the machines proper hostname (i.e the main
directory of the ftp server), everything is fine.

When you ftp to a virtual host (all of which point to 
sub directories of the man ftp directory), you can log on
as "anonymous", and everything works fine. BUT if you log as
"ftp", as soon as you do a dir or ls, you get the old 

421 Service not available, remote server has closed connection

and our friend signal 11 appears in messages. 

I've set things up identically on two servers. One is running
FreeBSD 2.1.5-RELEASE (the problem one) and the other, which
behaves fine is running FreeBSD 2.1.0-RELEASE.

I've taken the compiled ftpd from the "good" machine
and run it on the bad, to no effect.

I've had a look through th archives for anything similar, but it is
1:15 am after a rather hectic week, so apologies if I've missed 
something obvious. :-)

regards,
Ed
--
 Edmund Roche-Kelly			   [email-masked]
 EUnet Ireland Ltd.		      Development and Support Engineer
 4 Westland Square Dublin 2 / Ph: +353-1-6790832 / Fax: +353-1-6708118

---

From: Perry Rovers <[email-masked]>
Date: 7 Feb 1997 22:39:28 GMT

Pink elephants with an attitude inspired Edmund Roche-Kelly <[email-masked]> to tell garfield.mail.wu-ftpd:
[snip virtual on freebsd]

: 421 Service not available, remote server has closed connection

: I've set things up identically on two servers. One is running
: FreeBSD 2.1.5-RELEASE (the problem one) and the other, which
: behaves fine is running FreeBSD 2.1.0-RELEASE.
Hmm.. I'm using virtual servers on 2.1.5 without problems. Myabe you're
missing something in the structure of the virtual sites?

-- 
Perry Rovers ([email-masked])

---

From: Jon Lewis <[email-masked]>
Date: Fri, 7 Feb 1997 23:17:55 -0500 (EST)

> missing something in the structure of the virtual sites?

I missed the earlier part of this thread, but make sure you have wu-ftpd
beta12 or higher.  beta11 has a buffer overrun in the virtual ftp handling
that was causing segv's and:
421 Service not available, remote server has closed connection
for me on linux.

------------------------------------------------------------------
 Jon Lewis <[email-masked]>  |  Unsolicited commercial e-mail will
 Network Administrator       |  be proof-read for $199/hr.
________Finger [email-masked] for PGP public key_______

---

From: Neil Readwin <[email-masked]>
Date: Sat, 8 Feb 1997 00:03:10 -0500 (EST)

I'm new to the list so this one may already have been pointed out, but
another possible cause of SEGVs is the

	reply(530, "User %s access denied...(%s)", name);

at line 1183 of ftpd.c, although that would depend on the user being in
ftpusers or having an invalid shell. They could have changed the
implementation of vsnprintf in the later OS release to cause/prevent
the SEGV. Neil.
-- 
 We just don't discuss that capability.  I can't tell you why we don't
 discuss it because then I'd be discussing it. -- Pete Williams

---

From: Matthew Emmerton <[email-masked]>
Date: Sat, 8 Feb 1997 20:46:31 -0500 (EST)

> implementation of vsnprintf in the later OS release to cause/prevent

I'd also like to note that the above error is also present in the beta-12
version, as was causing error 11s (SEGV) for me running on SCO
OpenServer 5.

Matt
-----------------------------------------------------------
University of Waterloo - 1B Computer Science/Software Engineering
The Education Network of Ontario - Technical Contractor
[email-masked]   [email-masked]

---

From: Alain Magloire <[email-masked]>
Date: Sat, 8 Feb 1997 23:36:25 -0500 (EST)

> version, as was causing error 11s (SEGV) for me running on SCO

This is a very important issue, if you succeed to make
the server SIGVEC, that means somene can play on the
stack an issue arbitrary commands.

In the reply(), I see a danger if debug is set 
then vsprintf() may overrun the buffer.
can you confirm ?
If you have a patch, can you mail it to
Mr Barber and Cc the list please

-- 
Bonne anne'e, alain

---

From: Edmund Roche-Kelly <[email-masked]>
Date: Wed, 12 Feb 97 19:31:50 +0000

>421 Service not available, remote server has closed connection

It was on beta11. upgrading to beta 12 solved the problem. 
Funny thing is beta11 is working fine with virtual servers
on FreeBSD 2.1.0. 

Just to recap, the problem was when when users ftp'd into
a virtual server as "ftp" (not anonymous), and tried to 
do ls or dir, the connection would fall over. I suspect
the same thing would happen with any other command in 
the server's /bin (I also have tar and gzip in there),
but didn't get a chance to test it. 

Seeing as the problem doesn't occur with beta 12, or beta 
11 on FreeBSD 2.1.0, I guess it's some FreeBSD 2.1.5 <-> wu-ftpd 
beta 11 problem. Don't have time to track it down though. :-)

regards,
Ed

---

From: Jon Lewis <[email-masked]>
Date: Wed, 12 Feb 1997 14:41:24 -0500 (EST)

> Funny thing is beta11 is working fine with virtual servers

I suspect it's a case of stomping of different memory locations on
different systems with different results.  Beta11 was out for quite some
time, and I assume someone must have tried virtual ftp on linux before me. 

I've noticed with other things (innd) that memory corruption errors can
have wildly different results on the same platform where the only
difference is binary format (elf vs a.out).

---

From: Mike Sabbota <[email-masked]>
Date: Wed, 12 Feb 1997 15:08:43 -0500 (EST)

Maybe it is just a FreeBSD thing, but I had the same problems with V-ftp on
IRIX 5.3, and 6.2.  Moving to Beta 12 did solve the problem in my case 
as well. 

--Mike

 > Just to recap, the problem was when when 
users ftp'd into > a virtual server as "ftp" (not anonymous), and tried to 
> beta 11 problem. Don't have time to track it down though. :-)

...........................................................................
Mike Sabbota 			     	  URL:   http://www.rust.net/~mike/ 
Systems Engineer 	             	  Email: [email-masked]
RustNet Internet Services, Inc.      	  Voice: (810) 642-2276 ext.14
http://www.rust.net		     	  Fax:   (810) 642-3676
...........................................................................
	        == PLEASE USE FOR QUICKEST REPONSES ==    
Sales: [email-masked]			   Auto-Responder: [email-masked] 
Billing: [email-masked]                  Technical Support: [email-masked] 
...........................................................................

---

From: [email-masked] (Alvin Oga)
Date: Wed, 12 Feb 1997 23:18:58 -0800 (PST)

Hi Jon

> Jon Lewis wrote:

yes, virtual ftp w/ wu-ftpd( beta 12)  works fine for my linux box
( linux-2.0.28 )...One key for "getting what I wanted" is that
each virtual domain must have it's own unique IP number... :-(
	You can see how I set it up by reviewing my pages at:
	http://www.Linux-Consulting.com/FAQ_virtual

have fun
alvin