vhost/vsock: accept only packets with the right dst_cid
authorStefano Garzarella <sgarzare@redhat.com>
Fri, 6 Dec 2019 14:39:12 +0000 (15:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 4 Jan 2020 18:13:36 +0000 (19:13 +0100)
commitc483ef739b08186279501008ce939e5a3e2842f8
treed7e17180426947eff1d3c1c7501a69cb6c1d65e1
parent4840b6a7480b92c0942c10c5db803c67bf3ef9c6
vhost/vsock: accept only packets with the right dst_cid

[ Upstream commit 8a3cc29c316c17de590e3ff8b59f3d6cbfd37b0a ]

When we receive a new packet from the guest, we check if the
src_cid is correct, but we forgot to check the dst_cid.

The host should accept only packets where dst_cid is
equal to the host CID.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/vhost/vsock.c