Re: [PATCH] vhost: fix null pointer dereference in vhost_del_umem_range

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Denis Kirjanov <kda@xxxxxxxxxxxxxxxxx>
Date: Tue,  9 Jul 2019 13:42:51 +0200

> @@ -962,7 +962,8 @@ static void vhost_del_umem_range(struct vhost_umem *umem,
>  
>  	while ((node = vhost_umem_interval_tree_iter_first(&umem->umem_tree,
>  							   start, end)))
> -		vhost_umem_free(umem, node);
> +		if (node)
> +			vhost_umem_free(umem, node);

If 'node' is NULL we will not be in the body of the loop as per
the while() condition.

How did you test this?



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux