Skip to content

Commit f7a36b0

Browse files
mstsirkindavem330
authored andcommitted
vsock/virtio: suppress used length validation
It turns out that vhost vsock violates the virtio spec by supplying the out buffer length in the used length (should just be the in length). As a result, attempts to validate the used length fail with: vmw_vsock_virtio_transport virtio1: tx: used len 44 is larger than in buflen 0 Since vsock driver does not use the length fox tx and validates the length before use for rx, it is safe to suppress the validation in virtio core for this driver. Reported-by: Halil Pasic <[email protected]> Fixes: 939779f ("virtio_ring: validate used buffer length") Cc: "Jason Wang" <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]> Reviewed-by: Stefano Garzarella <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent f93fd0c commit f7a36b0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/vmw_vsock/virtio_transport.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -731,6 +731,7 @@ static unsigned int features[] = {
731731
static struct virtio_driver virtio_vsock_driver = {
732732
.feature_table = features,
733733
.feature_table_size = ARRAY_SIZE(features),
734+
.suppress_used_validation = true,
734735
.driver.name = KBUILD_MODNAME,
735736
.driver.owner = THIS_MODULE,
736737
.id_table = id_table,

0 commit comments

Comments
 (0)