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:	Wed, 22 Jun 2011 14:40:45 +0200
From:	Fabienne Ducroquet <fabiduc@...il.com>
To:	Marcus Meissner <meissner@...e.de>
Cc:	sundell.software@...il.com, Reinhard Max <max@...e.de>,
	"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Subject: net/ipv4: commit d0733d2e29b breaks rtorrent

Hi,

With the latest versions of the Linux kernel (I've just tried 
3.0.0-rc4-00034-g2992c4b) rtorrent (version 0.8.7 with libtorrent 
0.12.7, from Debian unstable) fails to start with the error message:

	rtorrent: Could not open/bind port for listening: Invalid argument

I bisected it down to:

	commit d0733d2e29b652b2e7b1438ececa732e4eed98eb
	Author: Marcus Meissner <meissner@...e.de>
	Date:   Wed Jun 1 21:05:22 2011 -0700

	    net/ipv4: Check for mistakenly passed in non-IPv4 address

	    Check against mistakenly passing in IPv6 addresses (which would result
	    in an INADDR_ANY bind) or similar incompatible sockaddrs.

	    Signed-off-by: Marcus Meissner <meissner@...e.de>
	    Cc: Reinhard Max <max@...e.de>
	    Signed-off-by: David S. Miller <davem@...emloft.net>
	---
	 net/ipv4/af_inet.c |    3 +++
	 1 files changed, 3 insertions(+), 0 deletions(-)

	diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
	index cc14631..9c19260 100644
	--- a/net/ipv4/af_inet.c
	+++ b/net/ipv4/af_inet.c
	@@ -465,6 +465,9 @@ int inet_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
		if (addr_len < sizeof(struct sockaddr_in))
			goto out;

	+       if (addr->sin_family != AF_INET)
	+               goto out;
	+
		chk_addr_ret = inet_addr_type(sock_net(sk), addr->sin_addr.s_addr);

		/* Not specified by any standard per-se, however it breaks too

With this commit reverted rtorrent works again.

Fabienne
--
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