350 Commits

Author SHA1 Message Date
openeuler-ci-bot
389df97ed4
!530 fix CVE-2021-3930/CVE-2021-3582/CVE-2021-3607/CVE-2021-3608(!268!275)
From: @yezengruan 
Reviewed-by: @kevinzhu1 
Signed-off-by: @kevinzhu1
2022-04-07 08:58:02 +00:00
yezengruan
bc7b2dfda0 fix CVE-2021-3582/CVE-2021-3607/CVE-2021-3608
hw/rdma: Fix possible mremap overflow in the pvrdma device (CVE-2021-3582)
pvrdma: Ensure correct input on ring init (CVE-2021-3607)
pvrdma: Fix the ring init error flow (CVE-2021-3608)

Signed-off-by: yezengruan <yezengruan@huawei.com>
2022-04-06 14:48:42 +08:00
Jinhao Gao
4abcbecf94 spec: Update release version with !268
Signed-off-by: Jinhao Gao <gaojinhao@huawei.com>
2022-04-06 14:48:29 +08:00
Jinhao Gao
675ed3bcfd hw/scsi/scsi-disk: MODE_PAGE_ALLS not allowed in MODE SELECT commands
This avoids an off-by-one read of 'mode_sense_valid' buffer in
hw/scsi/scsi-disk.c:mode_sense_page().

Fixes: CVE-2021-3930
Cc: qemu-stable@nongnu.org
Reported-by: Alexander Bulekov <alxndr@bu.edu>
Fixes: a8f4bbe2900 ("scsi-disk: store valid mode pages in a table")
Fixes: #546
Reported-by: Qiuhao Li <Qiuhao.Li@outlook.com>
Signed-off-by: Mauro Matteo Cascella <mcascell@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: AlexChen <alex.chen@huawei.com>
Signed-off-by: yezengruan <yezengruan@huawei.com>
Signed-off-by: Jinhao Gao <gaojinhao@huawei.com>
2022-04-06 14:48:16 +08:00
openeuler-ci-bot
59cb41c78f !408 add Phytium's CPU models: FT-2000+ and Tengyun-S2500.
Merge pull request !408 from imxcc/openEuler-20.03-LTS-SP3
2021-12-21 12:20:55 +00:00
imxcc
69103ffb29 add Phytium's CPU models: FT-2000+ and Tengyun-S2500
Signed-off-by: imxcc <xingchaochao@huawei.com>
2021-12-21 17:44:54 +08:00
openeuler-ci-bot
beadee95f6 !405 [sync] PR-400: Automatically generate code patches with openeuler !214
Merge pull request !405 from openeuler-sync-bot/sync-pr400-openEuler-20.03-LTS-Next-to-openEuler-20.03-LTS-SP3
2021-12-20 12:19:21 +00:00
Chen Qun
daf121cbbe spec: Update release version with !214
increase release verison by one

Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
(cherry picked from commit aa6375f79082ce4ea147ade518f88ef1360badd9)
2021-12-20 15:00:49 +08:00
Chen Qun
9c598f0304 spec: Update patch and changelog with !214 virtio-balloon: apply upstream patch. !214
virtio-balloon: apply upstream patch.

Signed-off-by: Chen Qun<kuhn.chenqun@huawei.com>
(cherry picked from commit 76bfa2efd5b5693a5eb3d87d15ed1e2686cc9f68)
2021-12-20 15:00:49 +08:00
Chen Qun
e899504bfe virtio-balloon: apply upstream patch.
Signed-off-by: Ming Yang <yangming73@huawei.com>
(cherry picked from commit 7dad9db1d63a3dc25ffc837c93eb0bde3ea612be)
2021-12-20 15:00:49 +08:00
openeuler-ci-bot
8a5b41c0d0 !395 Automatically generate code patches with openeuler !207
From: @kuhnchen18
Reviewed-by: @imxcc
Signed-off-by: @imxcc
2021-10-28 01:06:49 +00:00
Chen Qun
2548877d9b spec: Update release version with !207
increase release verison by one

Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
2021-10-27 21:28:24 +08:00
Chen Qun
4f067031b1 spec: Update patch and changelog with !207 sync from SP1 !207
fix cve-2020-35504
fix cve-2020-35505

Signed-off-by: Chen Qun<kuhn.chenqun@huawei.com>
2021-10-27 21:28:20 +08:00
Chen Qun
757fe50cbd fix cve-2020-35505
esp: ensure cmdfifo is not empty and current_dev is non-NULL

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: imxcc <xingchaochao@huawei.com>
2021-10-27 21:28:20 +08:00
Chen Qun
1d10eda8a7 fix cve-2020-35504
esp: always check current_req is not NULL before use in DMA callbacks

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: imxcc <xingchaochao@huawei.com>
2021-10-27 21:28:20 +08:00
openeuler-ci-bot
7768d6f2bb !392 sync from SP2
From: @imxcc
Reviewed-by: @kevinzhu1
Signed-off-by: @kevinzhu1
2021-10-21 03:04:59 +00:00
imxcc
2104fc99f9 fix cve-2021-3592 cve-2021-3593 cve-2021-3595
fix submodule slirp cve-2021-3592 cve-2021-3593 and cve-2021-3595

Signed-off-by: imxcc <xingchaochao@huawei.com>
2021-10-20 11:35:39 +08:00
Zhongrui Tang
31cbaf0af0 Modify changelogs in spec file which are out of order that caused compile error.
Signed-off-by:  Zhongrui Tang <tangzhongrui@cmss.chinamobile.com>
2021-10-20 11:35:28 +08:00
openeuler-ci-bot
54767b579e !382 Automatically generate code patches with openeuler !203
From: @kuhnchen18
Reviewed-by: @imxcc
Signed-off-by: @imxcc
2021-09-26 09:18:06 +00:00
Chen Qun
d30bb48e38 spec: Update release version with !203
increase release verison by one

Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
2021-09-26 16:28:53 +08:00
Chen Qun
815a770bd3 spec: Update patch and changelog with !203 fix CVE-2021-3748 #I4BI3F !203
virtio-net: fix use after unmap/free for sg

Signed-off-by: Chen Qun<kuhn.chenqun@huawei.com>
2021-09-26 16:28:39 +08:00
Chen Qun
724941aa3d virtio-net: fix use after unmap/free for sg
When mergeable buffer is enabled, we try to set the num_buffers after
the virtqueue elem has been unmapped. This will lead several issues,
E.g a use after free when the descriptor has an address which belongs
to the non direct access region. In this case we use bounce buffer
that is allocated during address_space_map() and freed during
address_space_unmap().

Fixing this by storing the elems temporarily in an array and delay the
unmap after we set the the num_buffers.

This addresses CVE-2021-3748.

Reported-by: Alexander Bulekov <alxndr@bu.edu>
Fixes: fbe78f4f55c6 ("virtio-net support")
Cc: qemu-stable@nongnu.org
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: imxcc <xingchaochao@huawei.com>
2021-09-26 16:28:39 +08:00
openeuler-ci-bot
f1d4486abb !373 Automatically generate code patches with openeuler !197
From: @kuhnchen18
Reviewed-by: 
Signed-off-by:
2021-09-24 03:10:40 +00:00
Chen Qun
255e850459 spec: Update release version with !197
increase release verison by one

Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
2021-09-15 21:27:14 +08:00
Chen Qun
710bcb8e78 spec: Update patch and changelog with !197 fix CVE-2021-3713 #I49VTJ !197
uas: add stream number sanity checks.

Signed-off-by: Chen Qun<kuhn.chenqun@huawei.com>
2021-09-15 21:27:12 +08:00
Chen Qun
f5b4a7d1e3 uas: add stream number sanity checks.
The device uses the guest-supplied stream number unchecked, which can
lead to guest-triggered out-of-band access to the UASDevice->data3 and
UASDevice->status3 fields.  Add the missing checks.

Fixes: CVE-2021-3713
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reported-by: Chen Zhe <chenzhe@huawei.com>
Reported-by: Tan Jingguo <tanjingguo@huawei.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210818120505.1258262-2-kraxel@redhat.com>
2021-09-15 21:27:12 +08:00
openeuler-ci-bot
9ad3374a09 !365 bugfix: 为热插的CPU初始化PMU
From: @imxcc
Reviewed-by: 
Signed-off-by:
2021-09-09 09:03:32 +00:00
imxcc
250f805a9d hw/arm/virt: Init PMU for hotplugged vCPU
Signed-off-by: imxcc <xingchaochao@huawei.com>
2021-08-31 17:20:42 +08:00
openeuler-ci-bot
6f849eef65 !356 【SP1分支同步】block_curl: add bolck_curl package
From: @lijiajie128
Reviewed-by: @imxcc
Signed-off-by: @imxcc
2021-08-20 02:29:02 +00:00
Jiajie Li
0ff9050fca block_curl: add bolck_curl package
Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2021-08-19 13:44:20 +08:00
openeuler-ci-bot
abc1406e45 !352 Automatically generate code patches with openeuler !184
From: @kuhnchen18
Reviewed-by: @imxcc
Signed-off-by: @imxcc
2021-08-16 10:45:30 +00:00
Chen Qun
e98f83ffa3 spec: Update release version with !184
increase release verison by one

Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
2021-08-16 16:27:29 +08:00
Chen Qun
51a6e68cb5 spec: Update patch and changelog with !184 fix CVE-2021-3682 #I45H4H !184
usbredir: fix free call

Signed-off-by: Chen Qun<kuhn.chenqun@huawei.com>
2021-08-16 16:27:29 +08:00
Chen Qun
c837e689ec usbredir: fix free call
data might point into the middle of a larger buffer, there is a separate
free_on_destroy pointer passed into bufp_alloc() to handle that.  It is
only used in the normal workflow though, not when dropping packets due
to the queue being full.  Fix that.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/491
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210722072756.647673-1-kraxel@redhat.com>
Signed-off-by: imxcc <xingchaochao@huawei.com>
2021-08-16 16:27:28 +08:00
openeuler-ci-bot
0bacd5ae13 !327 Automatically generate code patches with openeuler !158
From: @kuhnchen18
Reviewed-by: @imxcc
Signed-off-by: @imxcc
2021-07-19 11:17:15 +00:00
Chen Qun
d2b9019f32 spec: Update release version with !158
increase release verison by one

Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
2021-07-16 16:27:06 +08:00
Chen Qun
fe9a52eade spec: Update patch and changelog with !158 [feature]add support for AVX512_BF16 and new CPU model Cooperlake !158
x86: Intel AVX512_BF16 feature enabling
i386: Add MSR feature bit for MDS-NO
i386: Add macro for stibp
i386: Add new CPU model Cooperlake
target/i386: Add new bit definitions of MSR_IA32_ARCH_CAPABILITIES
target/i386: Add missed security features to Cooperlake CPU model
target/i386: add PSCHANGE_NO bit for the ARCH_CAPABILITIES MSR
target/i386: Export TAA_NO bit to guests

Signed-off-by: Chen Qun<kuhn.chenqun@huawei.com>
2021-07-16 16:27:03 +08:00
Chen Qun
2640c73b51 target/i386: Export TAA_NO bit to guests
TSX Async Abort (TAA) is a side channel attack on internal buffers in
some Intel processors similar to Microachitectural Data Sampling (MDS).

Some future Intel processors will use the ARCH_CAP_TAA_NO bit in the
IA32_ARCH_CAPABILITIES MSR to report that they are not vulnerable to
TAA. Make this bit available to guests.

Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Signed-off-by: Jingyi Wang <wangjingyi11@huawei.com>
2021-07-16 16:27:03 +08:00
Chen Qun
1f3e64d6ef target/i386: add PSCHANGE_NO bit for the ARCH_CAPABILITIES MSR
This is required to disable ITLB multihit mitigations in nested
hypervisors.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Signed-off-by: Jingyi Wang <wangjingyi11@huawei.com>
2021-07-16 16:27:03 +08:00
Chen Qun
777bd4cc19 target/i386: Add missed security features to Cooperlake CPU model
It lacks two security feature bits in MSR_IA32_ARCH_CAPABILITIES in
current Cooperlake CPU model, so add them.

This is part of uptream commit 2dea9d9

Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Jingyi Wang <wangjingyi11@huawei.com>
2021-07-16 16:27:03 +08:00
Chen Qun
6af78a0fd4 target/i386: Add new bit definitions of MSR_IA32_ARCH_CAPABILITIES
The bit 6, 7 and 8 of MSR_IA32_ARCH_CAPABILITIES are recently disclosed
for some security issues. Add the definitions for them to be used by named
CPU models.

Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Message-Id: <20191225063018.20038-2-xiaoyao.li@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Signed-off-by: Jingyi Wang <wangjingyi11@huawei.com>
2021-07-16 16:27:03 +08:00
Chen Qun
7b770e279d i386: Add new CPU model Cooperlake
Cooper Lake is intel's successor to Cascade Lake, the new
CPU model inherits features from Cascadelake-Server, while
add one platform associated new feature: AVX512_BF16. Meanwhile,
add STIBP for speculative execution.

Signed-off-by: Cathy Zhang <cathy.zhang@intel.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Reviewed-by: Tao Xu <tao3.xu@intel.com>
Message-Id: <1571729728-23284-4-git-send-email-cathy.zhang@intel.com>
Reviewed-by: Bruce Rogers <brogers@suse.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>

Signed-off-by: Jingyi Wang <wangjingyi11@huawei.com>
2021-07-16 16:27:03 +08:00
Chen Qun
570b7ec727 i386: Add macro for stibp
stibp feature is already added through the following commit.
0e89165829

Add a macro for it to allow CPU models to report it when host supports.

Signed-off-by: Cathy Zhang <cathy.zhang@intel.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Reviewed-by: Tao Xu <tao3.xu@intel.com>
Message-Id: <1571729728-23284-3-git-send-email-cathy.zhang@intel.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>

Signed-off-by: Jingyi Wang <wangjingyi11@huawei.com>
2021-07-16 16:27:03 +08:00
Chen Qun
b0d43e51f0 i386: Add MSR feature bit for MDS-NO
Define MSR_ARCH_CAP_MDS_NO in the IA32_ARCH_CAPABILITIES MSR to allow
CPU models to report the feature when host supports it.

Signed-off-by: Cathy Zhang <cathy.zhang@intel.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Reviewed-by: Tao Xu <tao3.xu@intel.com>
Message-Id: <1571729728-23284-2-git-send-email-cathy.zhang@intel.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>

Signed-off-by: Jingyi Wang <wangjingyi11@huawei.com>
2021-07-16 16:27:03 +08:00
Chen Qun
5c53cc20b8 x86: Intel AVX512_BF16 feature enabling
Intel CooperLake cpu adds AVX512_BF16 instruction, defining as
CPUID.(EAX=7,ECX=1):EAX[bit 05].

The patch adds a property for setting the subleaf of CPUID leaf 7 in
case that people would like to specify it.

The release spec link as follows,
https://software.intel.com/sites/default/files/managed/c5/15/\
architecture-instruction-set-extensions-programming-reference.pdf

Signed-off-by: Jing Liu <jing2.liu@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Signed-off-by: Jingyi Wang <wangjingyi11@huawei.com>
2021-07-16 16:27:03 +08:00
openeuler-ci-bot
2d6f58e3d2 !324 Automatically generate code patches with openeuler !155
From: @kuhnchen18
Reviewed-by: @imxcc
Signed-off-by: @imxcc
2021-07-14 02:22:41 +00:00
Chen Qun
b0ff231b14 spec: Update release version with !155
increase release verison by one

Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
2021-07-13 11:46:46 +08:00
Chen Qun
051ed0f96d spec: Update patch and changelog with !155 hw/net/rocker_of_dpa: fix double free bug of rocker device !155
hw/net/rocker_of_dpa: fix double free bug of rocker device

Signed-off-by: Chen Qun<kuhn.chenqun@huawei.com>
2021-07-13 11:46:29 +08:00
Chen Qun
a4efdbff92 hw/net/rocker_of_dpa: fix double free bug of rocker device
The of_dpa_cmd_add_l2_flood function of the rocker device
releases the memory of group->l2_flood.group_ids before
applying for new memory. If the l2_group configured by
the guest does not match the input group->l2_flood.group_ids,
the err_out branch is redirected to release the memory of the
group->l2_flood.group_ids branch. The pointer is not set to
NULL after the memory is freed. When the guest accesses the
of_dpa_cmd_add_l2_flood function again, the memory of
group->l2_flood.group_ids is released again. As a result,
the memory is double free.

Fix that by setting group->l2_flood.group_ids to NULL after free.

Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
Signed-off-by: Qiang Ning <ningqiang1@huawei.com>
2021-07-13 11:46:29 +08:00
openeuler-ci-bot
0ab601cd2f !313 Automatically generate code patches with openeuler !149
From: @kuhnchen18
Reviewed-by: @imxcc
Signed-off-by: @imxcc
2021-06-21 10:37:44 +00:00