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] [thread-next>] [day] [month] [year] [list]
Message-ID: <b6c93e88-0ba2-d07e-2597-e6935ab8de18@redhat.com>
Date:   Mon, 19 Jul 2021 11:30:09 +0800
From:   Jason Wang <jasowang@...hat.com>
To:     Xie Yongji <xieyongji@...edance.com>, mst@...hat.com,
        dan.carpenter@...cle.com
Cc:     virtualization@...ts.linux-foundation.org, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] vhost-vdpa: Fix integer overflow in
 vhost_vdpa_process_iotlb_update()


在 2021/7/16 下午6:22, Xie Yongji 写道:
> The "msg->iova + msg->size" addition can have an integer overflow
> if the iotlb message is from a malicious user space application.
> So let's fix it.
>
> Fixes: 1b48dc03e575 ("vhost: vdpa: report iova range")
> Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
> Signed-off-by: Xie Yongji <xieyongji@...edance.com>


Acked-by: Jason Wang <jasowang@...hat.com>


> ---
>   drivers/vhost/vdpa.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
> index 210ab35a7ebf..8e3c8790d493 100644
> --- a/drivers/vhost/vdpa.c
> +++ b/drivers/vhost/vdpa.c
> @@ -615,6 +615,7 @@ static int vhost_vdpa_process_iotlb_update(struct vhost_vdpa *v,
>   	int ret = 0;
>   
>   	if (msg->iova < v->range.first ||
> +	    msg->iova - 1 > U64_MAX - msg->size ||
>   	    msg->iova + msg->size - 1 > v->range.last)
>   		return -EINVAL;
>   

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ