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: <20070607151839.d8f1c164.dada1@cosmosbay.com>
Date:	Thu, 7 Jun 2007 15:18:39 +0200
From:	Eric Dumazet <dada1@...mosbay.com>
To:	Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
Cc:	linux-kernel@...r.kernel.org,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [2.6.22-rc4] UDP's local port assignment not working correctly.

On Thu, 7 Jun 2007 20:40:39 +0900
Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp> wrote:

> Hello.
> 
> Same local ports are assigned to multiple sockets.
> The following program should print different local port number.
> 
> ----- Start of program -----
> #include <stdio.h>
> #include <unistd.h>
> #include <sys/socket.h>
> #include <sys/types.h>
> #include <netinet/in.h>
> 
> int main(int argc, char *argv[]) {
> 	struct sockaddr_in addr;
> 	socklen_t size = sizeof(addr);
> 	int server = socket(PF_INET, SOCK_DGRAM, 0), client = socket(PF_INET, SOCK_DGRAM, 0);
> 	addr.sin_family = AF_INET;
> 	addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
> 	addr.sin_port = htons(0);
> 	
> 	printf("Server: Binding UDP 127.0.0.1 0 ... ");
> 	bind(server, (struct sockaddr *) &addr, sizeof(addr));
> 	getsockname(server, (struct sockaddr *) &addr, &size);
> 	printf("bound to port %d\n", ntohs(addr.sin_port));
> 	
> 	printf("Client: Connecting UDP 127.0.0.1 %d ... ", ntohs(addr.sin_port));
> 	connect(client, (struct sockaddr *) &addr, sizeof(addr));
> 	getsockname(client, (struct sockaddr *) &addr, &size);
> 	printf("bound to port %d\n", ntohs(addr.sin_port));
> 	
> 	return 0;
> }
> ----- End of program -----
> 
> I told YOSHIFUJI Hideaki and he answered me that
> this is a regression caused by changing UDP's hash search algorithm to 2-pass.
> 
> Thanks.

CC netdev

Yes, this was discovered two days ago and David reverted four commits.

http://git.kernel.org/?p=linux/kernel/git/davem/net-2.6.git;a=commitdiff;h=82c5fde20031375cd93fa5a247cf15603ea1f152

So it should probably be included in Linus tree very very soon.

-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ