lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4545D2FA.3030802@imag.fr>
Date:	Mon, 30 Oct 2006 11:24:58 +0100
From:	Videau Brice <brice.videau@...g.fr>
To:	linux-kernel@...r.kernel.org
Subject: Strange connect behavior

Hello,

While writing some client server application in c, we noticed a strange 
behavior : if we try to connect endlessly to a given local port where 
nobody is listening, and if the port is >= to 32768, after several 
thousands tries ( Connection refused ) connect will return 0.
This behavior is not exhibited when port is < 32768.

We confirmed this behavior in kernel 2.6.17-10, 2.6.18-1, 2.6.8, on x86 
and 2.4.21-32 on ia64, on several hardware configurations.
Distribution is debian or ubuntu.

Attached is a source file that demonstrate this behavior.
./a.out port_number

Sample execution :

./a.out 35489
Out port : 35489
connect try 1 failed : Connection refused
connect try 2 failed : Connection refused
connect try 3 failed : Connection refused
.....
connect try 6089 failed : Connection refused
connect try 6090 failed : Connection refused
Connection success : 6091 try
Connection closed
last error : Connection refused


Is this behavior to be expected?
Can it be disabled?

Thanks in advance.

Regards,

Brice Videau

View attachment "client.c" of type "text/x-csrc" (1537 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ