Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ncat: multiple-connections listen mode: client exiting causes Ncat: Program bug: fd (4) not on list. QUITTING. #2827

Open
pabs3 opened this issue May 1, 2024 · 0 comments
Labels

Comments

@pabs3
Copy link

pabs3 commented May 1, 2024

Describe the bug

When ncat is in multiple-connection listen send-only mode, if a client disconnects then ncat quits too.

To Reproduce

In the first terminal start ncat in multiple-connection listen mode, start ncat in connect recieve-only mode in two other terminals, enter foo in the listen ncat, kill the second connect ncat and finally enter bar in the listen ncat, which will then quit with an error:

$ ncat --listen --unixsock sock --keep-open --send-only
foo
bar
Ncat: Program bug: fd (4) not on list. QUITTING.

$ echo $?
2
$ ncat --unixsock sock --recv-only
foo
bar
$ 
$ ncat --unixsock sock --recv-only
foo
^C
$ 

Expected behavior

I would expect that a socket client closing would cause the listen ncat to forget about that client and continue sending to other clients.

Version info (please complete the following information):

  • OS: Debian GNU/Linux 6.7.12-1
  • Output of ncat --version: Ncat: Version 7.94SVN ( https://nmap.org/ncat )

Additional context
If I remove the --send-only option from the listen ncat, the problem doesn't happen.
In my current use-case, I prefer not to have ncat read any data clients write to it.

@pabs3 pabs3 added the Ncat label May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant