]> git.proxmox.com Git - pve-qemu-kvm.git/blame - debian/patches/extra/CVE-2016-9103-9pfs-fix-information-leak-in-xattr-read.patch
update upload target
[pve-qemu-kvm.git] / debian / patches / extra / CVE-2016-9103-9pfs-fix-information-leak-in-xattr-read.patch
CommitLineData
d37b5565
WB
1From 644566ea6fe2896b6b171797cfe6e7219939d968 Mon Sep 17 00:00:00 2001
2From: Li Qiang <liqiang6-s@360.cn>
3Date: Mon, 17 Oct 2016 14:13:58 +0200
4Subject: [PATCH 4/8] 9pfs: fix information leak in xattr read
5
69pfs uses g_malloc() to allocate the xattr memory space, if the guest
7reads this memory before writing to it, this will leak host heap memory
8to the guest. This patch avoid this.
9
10Signed-off-by: Li Qiang <liqiang6-s@360.cn>
11Reviewed-by: Greg Kurz <groug@kaod.org>
12Signed-off-by: Greg Kurz <groug@kaod.org>
13---
14 hw/9pfs/9p.c | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
18index 75ba5f1..3becdd0 100644
19--- a/hw/9pfs/9p.c
20+++ b/hw/9pfs/9p.c
21@@ -3269,7 +3269,7 @@ static void v9fs_xattrcreate(void *opaque)
22 xattr_fidp->fs.xattr.flags = flags;
23 v9fs_string_init(&xattr_fidp->fs.xattr.name);
24 v9fs_string_copy(&xattr_fidp->fs.xattr.name, &name);
25- xattr_fidp->fs.xattr.value = g_malloc(size);
26+ xattr_fidp->fs.xattr.value = g_malloc0(size);
27 err = offset;
28 put_fid(pdu, file_fidp);
29 out_nofid:
30--
312.1.4
32