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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 4 Aug 2016 14:38:25 +0100
From:	Stefan Hajnoczi <stefanha@...hat.com>
To:	ggarcia@...a.uab.cat
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH 1/1] virtio-vsock: Fix unbound rx buffer

On Mon, Aug 01, 2016 at 07:18:21PM +0200, ggarcia@...a.uab.cat wrote:

Besides the other locking issue that was already mentioned:

> diff --git a/net/vmw_vsock/virtio_transport_common.c b/net/vmw_vsock/virtio_transport_common.c
> index a53b3a1..3c38d43 100644
> --- a/net/vmw_vsock/virtio_transport_common.c
> +++ b/net/vmw_vsock/virtio_transport_common.c
> @@ -773,13 +773,23 @@ virtio_transport_recv_connected(struct sock *sk,
>  		pkt->len = le32_to_cpu(pkt->hdr.len);
>  		pkt->off = 0;
>  
> -		spin_lock_bh(&vvs->rx_lock);
> -		virtio_transport_inc_rx_pkt(vvs, pkt);
> -		list_add_tail(&pkt->list, &vvs->rx_queue);
> -		spin_unlock_bh(&vvs->rx_lock);
> +		if (vvs->rx_bytes + pkt->len <= vvs->buf_size) {

vvs->rx_bytes must be accessed under vvs->rx_lock.

Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ