diff options
author | Kai Kang <kai.kang@windriver.com> | 2015-06-18 17:02:42 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-01 21:19:41 +0100 |
commit | 328d35b53db61c86717c68cc564a790ccfa2956c (patch) | |
tree | 6feab80e4eb7b1df81c6d6fdad6977726ed0f442 /meta/recipes-devtools/qemu/qemu/09-xen-pt-mark-reserved-bits-in-PCI-config-space-fields-CVE-2015-4106.patch | |
parent | 2adb210c8cc5a11bb899e7dc76c31159ff3d4116 (diff) | |
download | poky-328d35b53db61c86717c68cc564a790ccfa2956c.tar.gz |
qemu: backport patches to fix CVE issues
Backport patches to fix CVE-2015-4103, CVE-2015-4104, CVE-2015-4105 and
CVE-2015-4106. These patches are from debian, but they are originally
from:
http://git.qemu.org/?p=qemu.git;a=shortlog;h=c25bbf1
(From OE-Core master rev: 496b3ffba6755bb76709c88cf81399c9d23f830a)
(From OE-Core rev: 29746e78ca000f4464c8e0a1da55c77e02c651e4)
Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Refresh the following patches to apply cleanly to our qemu-2.2.0:
07-xen-pt-split-out-calculation-of-throughable-mask-CVE-2015-4106.patch
10-xen-pt-add-a-few-PCI-config-space-field-descriptions-CVE-2015-4106.patch
Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/qemu/qemu/09-xen-pt-mark-reserved-bits-in-PCI-config-space-fields-CVE-2015-4106.patch')
-rw-r--r-- | meta/recipes-devtools/qemu/qemu/09-xen-pt-mark-reserved-bits-in-PCI-config-space-fields-CVE-2015-4106.patch | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu/09-xen-pt-mark-reserved-bits-in-PCI-config-space-fields-CVE-2015-4106.patch b/meta/recipes-devtools/qemu/qemu/09-xen-pt-mark-reserved-bits-in-PCI-config-space-fields-CVE-2015-4106.patch new file mode 100644 index 0000000000..d7d4a88a49 --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu/09-xen-pt-mark-reserved-bits-in-PCI-config-space-fields-CVE-2015-4106.patch | |||
@@ -0,0 +1,93 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
4 | |||
5 | From 0ad3393ad032f76e88b4dbd04d36ad84dff75dd6 Mon Sep 17 00:00:00 2001 | ||
6 | From: Jan Beulich <jbeulich@suse.com> | ||
7 | Date: Tue, 2 Jun 2015 15:07:01 +0000 | ||
8 | Subject: xen/pt: mark reserved bits in PCI config space fields | ||
9 | Bug-Debian: http://bugs.debian.org/787547 | ||
10 | |||
11 | The adjustments are solely to make the subsequent patches work right | ||
12 | (and hence make the patch set consistent), namely if permissive mode | ||
13 | (introduced by the last patch) gets used (as both reserved registers | ||
14 | and reserved fields must be similarly protected from guest access in | ||
15 | default mode, but the guest should be allowed access to them in | ||
16 | permissive mode). | ||
17 | |||
18 | This is a preparatory patch for XSA-131. | ||
19 | |||
20 | Signed-off-by: Jan Beulich <jbeulich@suse.com> | ||
21 | --- | ||
22 | hw/xen/xen_pt.h | 2 ++ | ||
23 | hw/xen/xen_pt_config_init.c | 14 +++++++++----- | ||
24 | 2 files changed, 11 insertions(+), 5 deletions(-) | ||
25 | |||
26 | Index: qemu-2.2.0/hw/xen/xen_pt.h | ||
27 | =================================================================== | ||
28 | --- qemu-2.2.0.orig/hw/xen/xen_pt.h | ||
29 | +++ qemu-2.2.0/hw/xen/xen_pt.h | ||
30 | @@ -101,6 +101,8 @@ struct XenPTRegInfo { | ||
31 | uint32_t offset; | ||
32 | uint32_t size; | ||
33 | uint32_t init_val; | ||
34 | + /* reg reserved field mask (ON:reserved, OFF:defined) */ | ||
35 | + uint32_t res_mask; | ||
36 | /* reg read only field mask (ON:RO/ROS, OFF:other) */ | ||
37 | uint32_t ro_mask; | ||
38 | /* reg emulate field mask (ON:emu, OFF:passthrough) */ | ||
39 | Index: qemu-2.2.0/hw/xen/xen_pt_config_init.c | ||
40 | =================================================================== | ||
41 | --- qemu-2.2.0.orig/hw/xen/xen_pt_config_init.c | ||
42 | +++ qemu-2.2.0/hw/xen/xen_pt_config_init.c | ||
43 | @@ -580,8 +580,8 @@ static XenPTRegInfo xen_pt_emu_reg_heade | ||
44 | .offset = PCI_VENDOR_ID, | ||
45 | .size = 2, | ||
46 | .init_val = 0x0000, | ||
47 | - .ro_mask = 0xFFFF, | ||
48 | - .emu_mask = 0xFFFF, | ||
49 | + .res_mask = 0xF880, | ||
50 | + .emu_mask = 0x0743, | ||
51 | .init = xen_pt_vendor_reg_init, | ||
52 | .u.w.read = xen_pt_word_reg_read, | ||
53 | .u.w.write = xen_pt_word_reg_write, | ||
54 | @@ -627,7 +627,8 @@ static XenPTRegInfo xen_pt_emu_reg_heade | ||
55 | .offset = PCI_STATUS, | ||
56 | .size = 2, | ||
57 | .init_val = 0x0000, | ||
58 | - .ro_mask = 0x06FF, | ||
59 | + .res_mask = 0x0007, | ||
60 | + .ro_mask = 0x06F8, | ||
61 | .emu_mask = 0x0010, | ||
62 | .init = xen_pt_status_reg_init, | ||
63 | .u.w.read = xen_pt_word_reg_read, | ||
64 | @@ -1004,7 +1005,8 @@ static XenPTRegInfo xen_pt_emu_reg_pm[] | ||
65 | .offset = PCI_PM_CTRL, | ||
66 | .size = 2, | ||
67 | .init_val = 0x0008, | ||
68 | - .ro_mask = 0xE1FC, | ||
69 | + .res_mask = 0x00F0, | ||
70 | + .ro_mask = 0xE10C, | ||
71 | .emu_mask = 0x810B, | ||
72 | .init = xen_pt_common_reg_init, | ||
73 | .u.w.read = xen_pt_word_reg_read, | ||
74 | @@ -1292,7 +1294,8 @@ static XenPTRegInfo xen_pt_emu_reg_msi[] | ||
75 | .offset = PCI_MSI_FLAGS, | ||
76 | .size = 2, | ||
77 | .init_val = 0x0000, | ||
78 | - .ro_mask = 0xFF8E, | ||
79 | + .res_mask = 0xFE00, | ||
80 | + .ro_mask = 0x018E, | ||
81 | .emu_mask = 0x017E, | ||
82 | .init = xen_pt_msgctrl_reg_init, | ||
83 | .u.w.read = xen_pt_word_reg_read, | ||
84 | @@ -1470,7 +1473,8 @@ static XenPTRegInfo xen_pt_emu_reg_msix[ | ||
85 | .offset = PCI_MSI_FLAGS, | ||
86 | .size = 2, | ||
87 | .init_val = 0x0000, | ||
88 | - .ro_mask = 0x3FFF, | ||
89 | + .res_mask = 0x3800, | ||
90 | + .ro_mask = 0x07FF, | ||
91 | .emu_mask = 0x0000, | ||
92 | .init = xen_pt_msixctrl_reg_init, | ||
93 | .u.w.read = xen_pt_word_reg_read, | ||