bin/100089: ftp(1): default ftp application of FreeBSD gives segmentation fault

Bruce Cran bruce at cran.org.uk
Mon May 5 17:50:04 UTC 2008


The following reply was made to PR bin/100089; it has been noted by GNATS.

From: Bruce Cran <bruce at cran.org.uk>
To: bug-followup at FreeBSD.org, Roel Verdult <roel at roeltje.com>
Cc:  
Subject: Re: bin/100089: ftp(1): default ftp application of FreeBSD gives
 segmentation fault
Date: Mon, 05 May 2008 18:42:19 +0100

 The problem occurs when the user is running named: one of the lines in 
 'ps -aux' begins with "bind" (since named runs under the username 
 'bind'), which libedit interprets as a command.  The same problem can be 
 seen just by running
 
  > echo bind | ftp
 
 The problem occurs because editline is only intialized if an interactive 
 tty is being used. Otherwise, the controlediting function in util.c 
 skips all the intializing calls.  However, later on cmdscanner is called 
 which attempts to run el_parse on unknown commands.  'el' is NULL and 
 causes a segfault when it's dereferenced in map_bind (map.c:1261).  The 
 fix is to prevent cmdscanner calling el_parse if 'editing' is 0.
 
 -- 
 Bruce


More information about the freebsd-bugs mailing list