9pfs: fix information leak in xattr read
commiteb687602853b4ae656e9236ee4222609f3a6887d
authorLi Qiang <liqiang6-s@360.cn>
Mon, 17 Oct 2016 12:13:58 +0000 (17 14:13 +0200)
committerGreg Kurz <groug@kaod.org>
Mon, 17 Oct 2016 12:13:58 +0000 (17 14:13 +0200)
tree875f836b8c6eca1e69fb32ab9ead7f22f0078d13
parent0e44a0fd3f28cccb8963fdfc05c53c546b3f46b6
9pfs: fix information leak in xattr read

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 <liqiang6-s@360.cn>
Reviewed-by: Greg Kurz <groug@kaod.org>
Signed-off-by: Greg Kurz <groug@kaod.org>
hw/9pfs/9p.c