]> git.baikalelectronics.ru Git - kernel.git/commit
virtio_vdpa: reject invalid vq indices
authorVincent Whitchurch <vincent.whitchurch@axis.com>
Thu, 1 Jul 2021 11:46:52 +0000 (13:46 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 11 Aug 2021 10:44:23 +0000 (06:44 -0400)
commite400c0885588356ecc25ac176b1fdfd0b549d8cb
treeda27808259b428408a686df937051774cee91d6d
parent6d2ddbbef8712df2dde16844e6f12aa94fdab302
virtio_vdpa: reject invalid vq indices

Do not call vDPA drivers' callbacks with vq indicies larger than what
the drivers indicate that they support.  vDPA drivers do not bounds
check the indices.

Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
Link: https://lore.kernel.org/r/20210701114652.21956-1-vincent.whitchurch@axis.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
drivers/virtio/virtio_vdpa.c