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] [thread-next>] [day] [month] [year] [list]
Message-Id: <20110622.224144.671030256188122882.davem@davemloft.net>
Date:	Wed, 22 Jun 2011 22:41:44 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	herbert@...dor.hengli.com.au
Cc:	netdev@...r.kernel.org
Subject: Re: unintended ipv4 broadcast policy change

From: David Miller <davem@...emloft.net>
Date: Wed, 22 Jun 2011 19:41:58 -0700 (PDT)

> From: Herbert Xu <herbert@...dor.hengli.com.au>
> Date: Thu, 23 Jun 2011 08:41:34 +0800
> 
>> On Wed, Jun 22, 2011 at 04:39:35PM -0700, David Miller wrote:
>>> This subtle new behavior is interesting because it means that
>>> a DHCP client could be implemented entirely with plain UDP
>>> sockets.
>> 
>> Yes this is indeed possible.  However, for compatibility purposes
>> I'm not sure whether we can safely rely on this new behaviour.
>> Maybe if we add the disable_ipv4 sysctl we can use it to signal
>> the presence of this new behaviour.
> 
> The easiest thing to do is to have the DHCP server first go:
> 
> 	ip addr add 0.0.0.0/0 broadcast 255.255.255.255 dev $(DEVICE)
> 
> and in fact this is essentially what ISC DHCP does on NetBSD and
> similar.

Except that my experiments show that we don't allow this.

In fact, it fails silently because of the code in __inet_insert_ifa()
that goes:

	if (!ifa->ifa_local) {
		inet_free_ifa(ifa);
		return 0;
	}

Sigh...

The only problematic case is receiving the initial broadcast
responses.

Sends are easy because if you use SO_BINDTODEVICE and MSG_DONTROUTE we
can convince the kernel to build us a route, even if no addresses and
routes are configured on the interface.

Will think about this some more.
--
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