We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 43bb40c commit 0e39829Copy full SHA for 0e39829
drivers/vhost/vdpa.c
@@ -614,7 +614,8 @@ static int vhost_vdpa_process_iotlb_update(struct vhost_vdpa *v,
614
long pinned;
615
int ret = 0;
616
617
- if (msg->iova < v->range.first ||
+ if (msg->iova < v->range.first || !msg->size ||
618
+ msg->iova > U64_MAX - msg->size + 1 ||
619
msg->iova + msg->size - 1 > v->range.last)
620
return -EINVAL;
621
0 commit comments