Nmap Development mailing list archives

Re: netcat : program bug


From: David Fifield <david () bamsoftware com>
Date: Tue, 6 Apr 2010 08:13:25 -0600

On Mon, Apr 05, 2010 at 05:54:49PM +0200, Julien Bouquillon [revolunet] wrote:
First ,thanx for your ncat great code; broker/chat modes are really handy
;:)

I dont know if this is a bug or a bad use of ncat from me :

server# ncat -klvvv 30000

client1# telnet server 30000     # ok
client2# telnet server 30000     # ok
client3# telnet server 30000     # ok

if client2 closes the connexion, then client3 closes his connection, i get a
"program bug":

(i use windows telnet as client for my tests)

Ncat: Version 5.21 ( http://nmap.org/ncat )
Ncat: Listening on 0.0.0.0:30000
NCAT DEBUG: Initialized fdlist with 102 maxfds
NCAT DEBUG: Added fd 3 to list, nfds 1, maxfd 3
NCAT DEBUG: Added fd 0 to list, nfds 2, maxfd 3
NCAT DEBUG: Initialized fdlist with 100 maxfds
NCAT DEBUG: selecting, fdmax 3
NCAT DEBUG: select returned 1 fds ready
NCAT DEBUG: fd 3 is ready
Ncat: Connection from 93.0.2.144.
NCAT DEBUG: Added fd 4 to list, nfds 3, maxfd 4
NCAT DEBUG: Added fd 4 to list, nfds 1, maxfd 4
NCAT DEBUG: selecting, fdmax 4
NCAT DEBUG: select returned 1 fds ready
NCAT DEBUG: fd 3 is ready
Ncat: Connection from 93.0.2.144.
NCAT DEBUG: Added fd 5 to list, nfds 4, maxfd 5
NCAT DEBUG: Added fd 5 to list, nfds 2, maxfd 5
NCAT DEBUG: selecting, fdmax 5
NCAT DEBUG: select returned 1 fds ready
NCAT DEBUG: fd 3 is ready
Ncat: Connection from 93.0.2.144.
NCAT DEBUG: Added fd 6 to list, nfds 5, maxfd 6
NCAT DEBUG: Added fd 6 to list, nfds 3, maxfd 6
NCAT DEBUG: selecting, fdmax 6
NCAT DEBUG: select returned 1 fds ready
NCAT DEBUG: fd 5 is ready
NCAT DEBUG: Closing connection.
NCAT DEBUG: Swapping fd[3] (5) with fd[4] (6)
NCAT DEBUG: Removed fd 5 from list, nfds 4, maxfd 6
NCAT DEBUG: Swapping fd[2] (6) with fd[2] (6)
NCAT DEBUG: Removed fd 6 from list, nfds 2, maxfd 5
NCAT DEBUG: selecting, fdmax 6
NCAT DEBUG: select returned 1 fds ready
NCAT DEBUG: fd 6 is ready
NCAT DEBUG: Closing connection.
NCAT DEBUG: Swapping fd[3] (6) with fd[3] (6)
NCAT DEBUG: Removed fd 6 from list, nfds 3, maxfd 4
Ncat: Program bug: fd (6) not on list. QUITTING.

Thanks for taking the time to report this and for your very good bug
report. Please try the newest version 5.30BETA1 from
http://nmap.org/download.html. I think this bug was fixed in r16845,
though when it was reported earlier it had different symptoms.

http://seclists.org/nmap-dev/2010/q1/648

David Fifield
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: