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]
Date:	Thu, 05 Mar 2009 14:00:58 +0100
From:	Paul Bolle <pebolle@...cali.nl>
To:	David Miller <davem@...emloft.net>
Cc:	netdev@...r.kernel.org
Subject: Re: [i4l] stop address leakage when shutting down an i4l ppp
	interface

It took longer than I hoped to respond to your message.

On Wed, 2009-01-14 at 14:50 -0800, David Miller wrote:
> From: Paul Bolle <pebolle@...cali.nl>
> > @@ -1336,6 +1336,13 @@ isdn_net_close(struct net_device *dev)
> >  	}
> >  	isdn_net_hangup(dev);
> >  	isdn_unlock_drivers();
> > +#ifdef CONFIG_ISDN_PPP
> > +	/* make sure arp_mc_map() handles this device properly */
> > +	if (dev->type == ARPHRD_PPP) {
> > +		dev->type = ARPHRD_ETHER;
> > +		dev->addr_len = ETH_ALEN;
> > +	}
> > +#endif
> >  	return 0;
> >  }
>
> I think it's pretty much illegal to change the device type after the
> device has been registered.

But isn't that what the i4l code already does?

Bringing up an i4l ppp interface will (in Fedora's ifup-ippp script) do
(among a lot of other stuff):
    isdnctrl addif ippp0
and then: 
    isdnctrl encap ippp0 syncppp

On the kernel side this will result (assuming, of course, I correctly
interpreted the relevant code) in these events: 
    isdn_ioctl(IIOCNETAIF)
    isdn_net_new()
    alloc_netdev()
    _isdn_setup()
    ether_setup()
        [...]
	dev->type = ARPHRD_ETHER
	dev->addr_len = ETH_ALEN
        [...]
    register_netdev() 
    [...]

followed by these events:
    isdn_ioctl(IIOCNETSCF)
    isdn_net_setcfg()
        [...]
        case ISDN_NET_ENCAP_SYNCPPP:
	    p->dev->type = ARPHRD_PPP
	    p->dev->addr_len = 0

This looks to me like it's changing the device type after the device has
been registered. Or were you referring to something else?


Paul

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