On 2017年03月08日 17:30, Cornelia Huck wrote:
On Wed, 8 Mar 2017 14:22:06 +0800
Jason Wang <jasow...@redhat.com> wrote:

On 2017年03月08日 11:21, Jason Wang wrote:
On 2017年03月07日 18:55, Paolo Bonzini wrote:
On 07/03/2017 09:47, Jason Wang wrote:
We don't destroy region cache during reset which can make the maps
of previous driver leaked to a buggy or malicious driver that don't
set vring address before starting to use the device.
I'm still not sure as to how this can happen.  Reset does clear
desc/used/avail, which should then be checked before accessing the
caches.
But the code does not check them in fact? (E.g the attached qtest
patch can still pass check-qtest).

Thanks
Ok, the reproducer seems wrong. And I think what you mean is something
like the check done in virtio_queue_ready(). But looks like not all
virtqueue check for this. One example is virtio_net_handle_ctrl(), and
Shouldn't the check for desc in virtio_queue_notify_vq() already take
care of that?

Yes, I miss this.


there may be even more. So you want to fix them all?
Obviously not speaking for Paolo, but I think the virtio core should
have be audited for missing guards.


Probably, otherwise we need a careful auditing of all callers of caches.

Thanks

Reply via email to