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]
Date:	Fri, 03 Feb 2012 10:25:53 +0400
From:	"Yurij M. Plotnikov" <Yurij.Plotnikov@...etlabs.ru>
To:	netdev@...r.kernel.org
Subject: Connect hangs for a while before returns -1 with ECONNREFUSED on
 3.2 for loopback

On kernel 3.2.0-0.bpo.1-amd64 I see some strange behaviour of connect() 
in case of connection via loopback. Lets see the following steps (there 
are two processes on the host, and the first one with two threads)

Thread1:
1. socket(PF_INET, SOCK_STREAM, 0) ->  3
2. bind(10.27.10.1:26820) ->  0 /* The address is bound to some interface, eth1 */
3. listen(3, 1) ->  0

sleep for a while

Thread2:
4. shutdown(3, SHUT_RD) ->  0

sleep for a while

Another process:
5. socket(PF_INET, SOCK_STREAM, 0) ->  4
6. connect(4, 10.27.10.1:26820)

connect() returns -1 with ECONNREFUSED but after some time. In case of 
two peer hosts connect() returns -1 with ECONNREFUSED almost 
immediately, so does for the other kernel versions.

In attachment c program to reproduce this problem.

View attachment "connect_loopback.c" of type "text/x-csrc" (1043 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ