Re: [Qemu-devel] [PATCH] vhost: Fix use-after-free in vhost_log_put()

2017-06-30 Thread jsli
On 2017-06-29 05:12, Marc-André Lureauwrote: > Hi > > On Fri, Jun 23, 2017 at 6:28 AM Jia-Shiun > Limailto:j...@synology.com)>wrote: > > In commit 9e0bc24f dev->log_size was reset to zero too early before > > syncing vhost log. It causes syncing to be skipped. > > ooch, I guess I didn't re

Re: [Qemu-devel] [PATCH] vhost: Fix use-after-free in vhost_log_put()

2017-06-28 Thread Marc-André Lureau
Hi On Fri, Jun 23, 2017 at 6:28 AM Jia-Shiun Li wrote: > In commit 9e0bc24f dev->log_size was reset to zero too early before > syncing vhost log. It causes syncing to be skipped. > > ooch, I guess I didn't realize it was also accessing dev->log_size when taking dev->log in local variable. I won

[Qemu-devel] [PATCH] vhost: Fix use-after-free in vhost_log_put()

2017-06-22 Thread Jia-Shiun Li
In commit 9e0bc24f dev->log_size was reset to zero too early before syncing vhost log. It causes syncing to be skipped. Move it to clear dev->log* after use. Signed-off-by: Jia-Shiun Li --- hw/virtio/vhost.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/virtio/vhost