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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 15 Feb 2014 18:10:41 +0100
From:	Hannes Frederic Sowa <hannes@...essinduktion.org>
To:	Vincent Li <vincent.mc.li@...il.com>
Cc:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: socket bind to local address ::ffff:127.0.0.1 question

On Wed, Feb 12, 2014 at 12:41:21PM -0800, Vincent Li wrote:
> we have a traffic path like <BIGIP monitor userland process on Linux>
> <------> router<------->pool/real server
> 
> there is a  weird issue that intermittently, a socket is bound to
> loopback address '::ffff:127.0.0.1' which caused issue for us because
> remote end host can't SYN+ACK the SYN source from 127.0.0.1, strace
> the userland process shows:
> 
> 6797  12:36:48.815296 connect(11, {sa_family=AF_INET6,
> sin6_port=htons(8180), inet_pton(AF_INET6, "::ffff:172.16.3.165",
> &sin6_addr), sin6_flowinfo=0, sin6_scope_id=875638834}, 28) = -1
> EINPROGRESS (Operation now in progress)

Have you checked the connect operation completed successfully in this
case? Error state would be interesting to see (SO_ERROR).

> 6797  12:36:48.815464 gettimeofday({1391744208, 815499}, NULL) = 0
> 6797  12:36:48.815552 time(NULL)        = 1391744208
> 6797  12:36:48.815657 stat64("/etc/localtime", {st_mode=S_IFREG|0644,
> st_size=331, ...}) = 0
> ...................
> 6797  12:36:48.816948 getsockname(11, {sa_family=AF_INET6,
> sin6_port=htons(45621), inet_pton(AF_INET6, "::ffff:127.0.0.1",
> &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0},
> [18433145657494601756]) = 0
   ^^^
Urks!

What kernel version are you using?

Do you have a reproducer, sample code in C where this problem sometimes
happens or could you expand the strace listings a bit (maybe setsockopts,
bindv6only settings)?

Also you seem to not initialize your struct sockaddr_in6 given to connect, as
the sin6_scope_id seems bogus (uninitialized memory?). But should not
matter with v4mapped addresses though.

Greetings,

  Hannes


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists