Re: [PATCH 1/1] vdpa: Fix possible use-after-free for VirtQueueElement

2023-07-10 Thread Eugenio Perez Martin
On Fri, Jul 7, 2023 at 6:44 PM Hawkins Jiawei wrote: > > QEMU uses vhost_handle_guest_kick() to forward guest's available > buffers to the vdpa device in SVQ avail ring. > > In vhost_handle_guest_kick(), a `g_autofree` `elem` is used to > iterate through the available VirtQueueElements. This `elem

[PATCH 1/1] vdpa: Fix possible use-after-free for VirtQueueElement

2023-07-07 Thread Hawkins Jiawei
QEMU uses vhost_handle_guest_kick() to forward guest's available buffers to the vdpa device in SVQ avail ring. In vhost_handle_guest_kick(), a `g_autofree` `elem` is used to iterate through the available VirtQueueElements. This `elem` is then passed to `svq->ops->avail_handler`, specifically to th