Re: [Qemu-devel] [PATCH] 9pfs: fix information leak in xattr read

2016-09-28 Thread Li Qiang
Yes, allocation here is also causing a memory leak issue. I will try to look more at it. On 2016-09-28 16:47 GMT+08:00 Greg Kurz wrote: > > > Heh not exactly... I'm just wondering why we allocate > xattr_fidp->fs.xattr.value > here if we don't use it. Can you please investigate if it is possible

Re: [Qemu-devel] [PATCH] 9pfs: fix information leak in xattr read

2016-09-28 Thread Greg Kurz
On Wed, 28 Sep 2016 14:42:05 +0800 Li Qiang wrote: > Hi Greg, > > What about this patch? > > It seems you have forget it. > Heh not exactly... I'm just wondering why we allocate xattr_fidp->fs.xattr.value here if we don't use it. Can you please investigate if it is possible to defer allocatio

Re: [Qemu-devel] [PATCH] 9pfs: fix information leak in xattr read

2016-09-27 Thread Li Qiang
Hi Greg, What about this patch? It seems you have forget it. 2016-09-27 12:44 GMT+08:00 Li Qiang : > From: Li Qiang > > 9pfs uses g_malloc() to allocate the xattr memory space, if the guest > reads this memory before writing to it, this will leak host heap > memory to the guest. This patch avo

[Qemu-devel] [PATCH] 9pfs: fix information leak in xattr read

2016-09-26 Thread Li Qiang
From: Li Qiang 9pfs uses g_malloc() to allocate the xattr memory space, if the guest reads this memory before writing to it, this will leak host heap memory to the guest. This patch avoid this. Signed-off-by: Li Qiang --- hw/9pfs/9p.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff