119 Commits

Author SHA1 Message Date
Euler Robot
66e514cb45 spec: Update release version with !14
increase release verison by one

Signed-off-by: Euler Robot <euler.robot@huawei.com>
2020-10-10 15:46:31 +08:00
Euler Robot
632df052b8 spec: Update patch and changelog with !14
hw/net/xgmac: Fix buffer overflow in xgmac_enet_send()
hw/net/net_tx_pkt: fix assertion failure in net_tx_pkt_add_raw_fragment()
sm501: Convert printf + abort to qemu_log_mask
sm501: Shorten long variable names in sm501_2d_operation
sm501: Use BIT(x) macro to shorten constant
sm501: Clean up local variables in sm501_2d_operation
sm501: Replace hand written implementation with pixman where possible

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Mauro Matteo Cascella <mcascell@redhat.com>
2020-10-10 15:46:22 +08:00
BALATON Zoltan
7215180b05 sm501: Replace hand written implementation with pixman where possible
Besides being faster this should also prevent malicious guests to
abuse 2D engine to overwrite data or cause a crash.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-id: 58666389b6cae256e4e972a32c05cf8aa51bffc0.1590089984.git.balaton@eik.bme.hu
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-10-10 15:46:07 +08:00
BALATON Zoltan
766ddaa416 sm501: Clean up local variables in sm501_2d_operation
Make variables local to the block they are used in to make it clearer
which operation they are needed for.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: ae59f8138afe7f6a5a4a82539d0f61496a906b06.1590089984.git.balaton@eik.bme.hu
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-10-10 15:45:52 +08:00
BALATON Zoltan
277037225c sm501: Use BIT(x) macro to shorten constant
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 124bf5de8d7cf503b32b377d0445029a76bfbd49.1590089984.git.balaton@eik.bme.hu
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-10-10 15:44:05 +08:00
BALATON Zoltan
ef912f6629 sm501: Shorten long variable names in sm501_2d_operation
This increases readability and cleans up some confusing naming.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-id: b9b67b94c46e945252a73c77dfd117132c63c4fb.1590089984.git.balaton@eik.bme.hu
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-10-10 15:43:49 +08:00
BALATON Zoltan
50dcc20a59 sm501: Convert printf + abort to qemu_log_mask
Some places already use qemu_log_mask() to log unimplemented features
or errors but some others have printf() then abort(). Convert these to
qemu_log_mask() and avoid aborting to prevent guests to easily cause
denial of service.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 305af87f59d81e92f2aaff09eb8a3603b8baa322.1590089984.git.balaton@eik.bme.hu
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2020-10-10 15:43:32 +08:00
Mauro Matteo Cascella
c30f07cade hw/net/net_tx_pkt: fix assertion failure in net_tx_pkt_add_raw_fragment()
An assertion failure issue was found in the code that processes network packets
while adding data fragments into the packet context. It could be abused by a
malicious guest to abort the QEMU process on the host. This patch replaces the
affected assert() with a conditional statement, returning false if the current
data fragment exceeds max_raw_frags.

Reported-by: Alexander Bulekov <alxndr@bu.edu>
Reported-by: Ziming Zhang <ezrakiez@gmail.com>
Reviewed-by: Dmitry Fleytman <dmitry.fleytman@gmail.com>
Signed-off-by: Mauro Matteo Cascella <mcascell@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
2020-10-10 15:43:18 +08:00
Mauro Matteo Cascella
2a884f8abb hw/net/xgmac: Fix buffer overflow in xgmac_enet_send()
A buffer overflow issue was reported by Mr. Ziming Zhang, CC'd here. It
occurs while sending an Ethernet frame due to missing break statements
and improper checking of the buffer size.

Reported-by: Ziming Zhang <ezrakiez@gmail.com>
Signed-off-by: Mauro Matteo Cascella <mcascell@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Jason Wang <jasowang@redhat.com>
2020-10-10 15:43:01 +08:00
AlexChen
06f886beec qemu: rename some patches for slirp
Signed-off-by: AlexChen <alex.chen@huawei.com>
2020-10-10 15:42:27 +08:00
AlexChen
a7b090aaca qemu: enrich commit info for some patchs
Signed-off-by: AlexChen <alex.chen@huawei.com>
2020-10-10 15:41:56 +08:00
Jiajie Li
74e366ee0f Fix CVE-2020-25085 & CVE-2020-25084
Signed-off-by Jiajie Li <lijiajie11@huawei.com>
2020-10-10 15:41:09 +08:00
Jiajie Li
3b04b46775 Drop bogus IPv6 messages
Drop IPv6 message shorter than what's mentioned in the payload
  length header (+ the size of the IPv6 header). They're invalid and could
  lead to data leakage in icmp6_send_echoreply().
2020-10-10 15:40:02 +08:00
openeuler-ci-bot
cce9e18917 !88 fix hw/usb/core.c fix buffer overflow in do_token_setup
Merge pull request !88 from lijiajie128/openEuler-20.03-LTS
2020-08-27 21:06:22 +08:00
lijiajie
514ab9213b update qemu.spec with hw-usb-core-fix-overflow.patch 2020-08-27 20:43:36 +08:00
lijiajie
22b067020e hw/usb/core.c fix buffer overflow in do_token_setup() function
Store calculated setup_len in a local variable, verify it, and only
write it to the struct(USBDevice->setup_len)in case it passed the
sanity checks.

This prevent other code (do_token_{in,out}function specifically)
from working with invalid USBDevice->setup_len values and overruning
the USBDevice->setup_buf[] buffer.

Fixes: CVE-2020-14364
2020-08-27 20:34:42 +08:00
openeuler-ci-bot
e6824283ca !74 hw/arm/acpi: enable SHPC native hot plug
Merge pull request !74 from 金泽宇/openEuler-20.03-LTS
2020-08-13 09:54:08 +08:00
Zeyu Jin
2bfc4806b3 hw/arm/acpi: enable SHPC native hot plug
backport from upstream:
https://git.qemu.org/?p=qemu.git;a=commit;h=e04c13cdcf5befd9d08df38d4d34494a802cdf63

Signed-off-by: Zeyu Jin <jinzeyu@huawei.com>
2020-08-12 14:14:30 +08:00
openeuler-ci-bot
00d4a81e22 !69 LTS分支增加qemu.spec rdb支持
Merge pull request !69 from 金泽宇/openEuler-20.03-LTS
2020-08-12 09:31:40 +08:00
Zeyu Jin
b7af38f23a spec: increase build-requirement of rbd-devel
Rbd support is default in qemu configure, so we should also add rbd support in qemu.spec .

Signed-off-by: jinzeyu <jinzeyu@huawei.com>
2020-08-11 20:47:23 +08:00
openeuler-ci-bot
c80e7e61dc !61 Enable werror for qemu and fix a building warning
Merge pull request !61 from FangYing/openEuler-20.03-LTS
2020-08-04 17:38:23 +08:00
Ying Fang
b2456150ba spec: enable Werror by default
enable Werror by default so that we can check compilation warnnings

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-08-04 15:30:36 +08:00
Ying Fang
8583518dca migration: add missing ram.h for migration/socket.c
ram.h is missing for migration/socket.c, let's add it.
Later we will enable werror for qemu.spec

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-08-04 15:12:22 +08:00
openeuler-ci-bot
7e5fd29f2c !59 [bugfix] pick several patches from upstream that fix CVE
Merge pull request !59 from zhanghailiang/openEuler-20.03-LTS
2020-07-29 17:05:08 +08:00
zhanghailiang
82b842349a qemu: pick serveral patches from upstream that fix CVE
Fix CVE-2020-13361, CVE-2020-13659, CVE-2020-13800, CVE-2020-13362

Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
2020-07-25 13:25:59 +08:00
openeuler-ci-bot
f55df4e982 !56 [bugfix] fix two patches format and one CVE bug
Merge pull request !56 from zhanghailiang/openEuler-20.03-LTS
2020-06-20 17:12:02 +08:00
zhanghailiang
a8e410c7ce spec: increase release number
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
2020-06-20 15:42:02 +08:00
zhanghailiang
7a630f65f1 target/arm: Fix PAuth sbox functions
Fix CVE-2020-10702 bug

Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
2020-06-20 15:41:47 +08:00
zhanghailiang
aa9682be92 patch: fix patch format problem which can lead git am failed
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
2020-06-20 15:41:33 +08:00
openeuler-ci-bot
65a86d3003 !52 Add kvm_adjvtimer vcpu property for Cortex-A72
Merge pull request !52 from FangYing/openEuler-20.03-LTS
2020-05-29 14:08:03 +08:00
Ying Fang
dcba4d91a4 spec: Update release version
increase release version by one

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-05-29 11:16:19 +08:00
Ying Fang
12087330c1 target/arm: Add the kvm_adjvtime vcpu property for Cortex-A72
Add the kvm_adjvtime vcpu property for ARM Cortex-A72 cpu model,
so that virtual time adjust will be enabled for it.

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-05-29 11:15:45 +08:00
Ying Fang
cdc4c75a8b Revert "target/arm: add ths missing GENERIC_TIMER"
This reverts commit 665d6b61fd86629272885e281410f512f8e7f32e.
2020-05-29 11:09:01 +08:00
XuYandong
ae7185c91d !51 [bugfix] add missing GENERIC_TIMER for cpu64
Merge pull request !51 from zhanghailiang/openEuler-20.03-LTS
2020-05-28 21:10:40 +08:00
zhanghailiang
665d6b61fd target/arm: add ths missing GENERIC_TIMER
Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
2020-05-28 20:19:41 +08:00
openeuler-ci-bot
0f9eaf7ed5 !48 Drop vtimer virutal time adjust
Merge pull request !48 from FangYing/openEuler-20.03-LTS
2020-05-27 21:51:18 +08:00
Ying Fang
863c2d9a26 spec: Update release version
increase release verison by one

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-05-27 17:55:44 +08:00
Ying Fang
79484a725d vtimer: Drop vtimer virtual timer adjust
This patch drops the vtimer virtual timer adjust, cross version migration
from openEuler qemu-4.0.1 to qemu-4.1.0 is not supported as a consequence.

By default openEuler qemu-4.1.0 use kvm_adjvtime as the virtual timer.

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-05-27 17:54:00 +08:00
openeuler-ci-bot
3e65b9f2c0 !47 Compat vtimer for openEuler qemu v4.0.1 and v4.1.0
Merge pull request !47 from FangYing/openEuler-20.03-LTS
2020-05-27 12:56:19 +08:00
Ying Fang
56680863f3 spec: Update release version
increase release version by one

Signed-off-by: Ying Fang <fanging1@huawei.com>
2020-05-27 12:14:35 +08:00
Ying Fang
1461981236 migration: Compat virtual timer adjust for v4.0.1 and v4.1.0
Vtimer adjust is used in openEuler qemu-4.0.1, however kvm_adjvtime
is introduced in openEuler qemu-4.1.0. To maintain the compatibility
and enable cross version migration, let's enable vtimer adjust only
if kvm_adjvtime is not enabled, otherwise there may be conflicts
between vtimer adjust and kvm_adjvtime.

After this modification:
1: openEuler qemu-4.0.1 use vtimer as the default virtual timer
2: openEuler qemu-4.1.0 use kvm_adjvtime as the defaut virtual timer

Migration from openEuler qemu-4.0.1 to openEuler qemu-4.1.0 will
be ok, but migration path from upstream qemu-4.0.1 to openEuler
qemu-4..0.1 will be broken.

Since openEuler qemu-4.1.0, kvm_adjvtime is used as the default
virtual timer. So please upgrade to openEuler qemu-4.1.0 and
use the virt-4.1 machine.

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-05-27 12:13:58 +08:00
Ying Fang
892f646185 hw/arm/virt: add missing compat for kvm-no-adjvtime
Machine compatibility for kvm-no-adjvtime is missed,
let's add it for virt machine 4.0, thus kvm-no-adjvtime
is supported in v4.1.0.

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-05-27 12:13:48 +08:00
Ying Fang
1001a58940 vtimer: introduce the vtimer first used in v4.0.1
To support cross version migration, we had to add the vtimer back
which was introduced in openEuler qemu-4.0.1.

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-05-27 12:13:37 +08:00
Ying Fang
52e260612c Revert: "vtimer: compat cross version migration from v4.0.1"
This reverts commit patch:
vtimer-compat-cross-version-migration-from-v4.0.1.patch

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-05-27 12:13:17 +08:00
openeuler-ci-bot
40b5784387 !45 [feature] Add some debug log in VM runtime path
Merge pull request !45 from FangYing/openEuler-20.03-LTS
2020-05-25 21:07:29 +08:00
Ying Fang
9fc44209ab spec: Update release version
increase release version by one

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-05-22 19:27:25 +08:00
Ying Fang
30364c2a3e log: Add some logs on VM runtime path
Add logs on VM runtime path, to make it easier to do trouble shooting.

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-05-22 19:27:13 +08:00
openeuler-ci-bot
682a457d22 !43 fix CVE-2018-19665 and CVE-2019-15890
Merge pull request !43 from FangYing/openEuler-20.03-LTS
2020-05-22 14:03:17 +08:00
Leo Fang
26cae7937d CVE: Fix CVE-2018-19665
upstream url:
https://patchwork.kernel.org/patch/10688527/

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-05-22 12:29:21 +08:00
Ying Fang
ae206fbfdc CVE: Fix CVE-2019-15890
this patch fix CVE-2019-15890, upstream patch url:
https://gitlab.freedesktop.org/slirp/libslirp/commit/c5927943

Signed-off-by: Ying Fang <fangying1@huawei.com>
2020-05-22 12:27:56 +08:00