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: <20180929.114023.1370133506922372520.davem@davemloft.net>
Date:   Sat, 29 Sep 2018 11:40:23 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     vdronov@...hat.com
Cc:     kuznet@....inr.ac.ru, yoshfuji@...ux-ipv6.org,
        netdev@...r.kernel.org, syzkaller@...glegroups.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: arp, ipv6: handle special case of tap device

From: Vladis Dronov <vdronov@...hat.com>
Date: Wed, 26 Sep 2018 11:30:18 +0200

> @@ -187,7 +187,14 @@ EXPORT_SYMBOL(arp_tbl);
>  
>  int arp_mc_map(__be32 addr, u8 *haddr, struct net_device *dev, int dir)
>  {
> -	switch (dev->type) {
> +	unsigned short type = dev->type;
> +
> +#if IS_ENABLED(CONFIG_TAP)
> +	if (dev->rtnl_link_ops && !strcmp(dev->rtnl_link_ops->kind, "tun"))
> +		type = ARPHRD_ETHER;
> +#endif /* CONFIG_TAP */

This is insanely ugly.

dev->type determines the link layer header layout and size.

You can fix the kernel, but userspace AF_PACKET applications are still
going to be broken by this behavior.  And that is just the tip of the
iceberg.

I'm not applying this, sorry.  I think tun/tap should be prevented from
allowing the dev->type to be changed, unless it will make those changes
adjust the link layer headers properly as well.

Sorry.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ