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]
Date:	Fri, 28 Jun 2013 21:32:25 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	asias@...hat.com
Cc:	netdev@...r.kernel.org, kvm@...r.kernel.org,
	virtualization@...ts.linux-foundation.org, acking@...are.com,
	dtor@...are.com, grantr@...are.com, rusty@...tcorp.com.au,
	mst@...hat.com, jasowang@...hat.com, stefanha@...il.com,
	kraxel@...hat.com, penberg@...nel.org, sasha.levin@...cle.com
Subject: Re: [RFC 2/5] VSOCK: Introduce virtio-vsock-common.ko

From: Asias He <asias@...hat.com>
Date: Thu, 27 Jun 2013 16:00:01 +0800

> +static void
> +virtio_transport_recv_dgram(struct sock *sk,
> +			    struct virtio_vsock_pkt *pkt)
 ...
> +	memcpy(skb->data, pkt, sizeof(*pkt));
> +	memcpy(skb->data + sizeof(*pkt), pkt->buf, pkt->len);

Are you sure this is right?

Shouldn't you be using "sizeof(struct virtio_vsock_hdr)" instead of
"sizeof(*pkt)".  'pkt' is "struct virtio_vsock_pkt" and has all kinds
of meta-data you probably don't mean to include in the SKB.
--
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