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: <20160613064202.GA14048@rapoport-lnx>
Date:	Mon, 13 Jun 2016 09:42:03 +0300
From:	Mike Rapoport <rppt@...ux.vnet.ibm.com>
To:	David Ahern <dsa@...ulusnetworks.com>
Cc:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: udp failures traced to e858fae2b0b8

Hi David,

On Sun, Jun 12, 2016 at 08:47:20PM -0600, David Ahern wrote:
> Mike:
> 
> UDP tests in my vrf unit test suite are failing. git bisect points to:

Are you testing host or guest kernel?
If it's the host, can you please check if the patch below helps? 
 
> dsa@...ny:~/kernel-2.git$ git bisect good
> e858fae2b0b8f41f0bed2cdffde25e7c97da38a7 is the first bad commit
> commit e858fae2b0b8f41f0bed2cdffde25e7c97da38a7
> Author: Mike Rapoport <rppt@...ux.vnet.ibm.com>
> 
>     virtio_net: use common code for virtio_net_hdr and skb GSO conversion
> 
> On console I get the following:
> 
> [   80.414134] skbuff: bad partial csum: csum=34/6 len=40
> [   80.416105] eth1: bad gso: type: 0, size: 0
> 
> Networking arg:
> 
> -netdev
> type=tap,vhost=on,ifname=vm01-eth1,script=no,downscript=no,id=netdev1
> -device virtio-net-pci,mac=02:e0:f9:1c:b9:74,netdev=netdev1,romfile=
> 
> tap device is connected to a bridge.
> 
> David
> 

diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 8cc6bf4..4884802 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -1254,6 +1254,13 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile,
 		return -EFAULT;
 	}
 
+	err = virtio_net_hdr_to_skb(skb, &gso, tun_is_little_endian(tun));
+	if (err) {
+		this_cpu_inc(tun->pcpu_stats->rx_frame_errors);
+		kfree_skb(skb);
+		return -EINVAL;
+	}
+
 	switch (tun->flags & TUN_TYPE_MASK) {
 	case IFF_TUN:
 		if (tun->flags & IFF_NO_PI) {
@@ -1280,13 +1287,6 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile,
 		break;
 	}
 
-	err = virtio_net_hdr_to_skb(skb, &gso, tun_is_little_endian(tun));
-	if (err) {
-		this_cpu_inc(tun->pcpu_stats->rx_frame_errors);
-		kfree_skb(skb);
-		return -EINVAL;
-	}
-
 	/* copy skb_ubuf_info for callback when skb has no error */
 	if (zerocopy) {
 		skb_shinfo(skb)->destructor_arg = msg_control;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ