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-prev] [day] [month] [year] [list]
Message-ID: <20110622230239.GA5009@localhost>
Date:	Thu, 23 Jun 2011 01:02:39 +0200
From:	Fabienne Ducroquet <fabiduc@...il.com>
To:	Stephen Hemminger <shemminger@...tta.com>
Cc:	Reinhard Max <max@...e.de>, Marcus Meissner <meissner@...e.de>,
	sundell.software@...il.com,
	"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: net/ipv4: commit d0733d2e29b breaks rtorrent

On Wed, Jun 22, 2011 at 08:53:29AM -0700, Stephen Hemminger wrote:
> You can find code here http://libtorrent.rakshasa.no/
> but it is in C++ so there is an abnormally high indirection factor
> between reality of the bug and the code as written.

I had a look at the code, I found where bind is called, but it does not 
help: it is in libtorrent/src/net/socket_fd.cc:

	bool
	SocketFd::bind(const rak::socket_address& sa) {
	  check_valid();
	
	  return !::bind(m_fd, sa.c_sockaddr(), sa.length());
	}

check_valid() checks the validity of the socket FD.
It is called by the function:

	bool
	Listen::open(uint16_t first, uint16_t last, const rak::socket_address* bindAddress) {
	  close();

	  [ Checks that the range of the ports is OK, that the address 
	  is an inet or inet6 address, that the socket can be 
	  allocated.]

	  rak::socket_address sa;
	  sa.copy(*bindAddress, bindAddress->length());

	  for (uint16_t i = first; i <= last; ++i) {
	  sa.set_port(i);

	  if (get_fd().bind(sa) && get_fd().listen(50)) {
	     ...

in libtorrent/src/net/listen.cc. That function was called by:

	bool
	ConnectionManager::listen_open(port_type begin, port_type end) {
	  if (!m_listen->open(begin, end, rak::socket_address::cast_from(m_bindAddress)))
	    return false;
	
	  m_listenPort = m_listen->port();
	
	  return true;
	}

in libtorrent/src/torrent/connection_manager.cc, and it was itself 
called by Manager::listen_open() in rtorrent/core/manager.cc, which 
throws the error message I got because the call to

	torrent::connection_manager()->listen_open(portFirst, portLast)

fails.

So the question now is to find how the m_bindAddress used in 
ConnectionManager::listen_open is set, but I prefer not to do that right 
now.

> Did you try contacting the developer?

I've put him in the Cc: since the first message.

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