147 Commits

Author SHA1 Message Date
openeuler-ci-bot
bf58106e5b !54 Automatically generate code patches with openeuler
From: @zhendongchen
Reviewed-by: @yorifang
Signed-off-by: @yorifang
2021-01-21 09:34:39 +08:00
Euler Robot
6a684f06d7 spec: Update release version with !19 !20
increase release verison by one

Signed-off-by: Euler Robot <euler.robot@huawei.com>
2021-01-20 10:54:01 +08:00
Euler Robot
bcedf758ec spec: Update patch and changelog with !19
util: Move virIsDevMapperDevice() to virdevmapper.c
virdevmapper: Don't use libdevmapper to obtain dependencies

Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2021-01-20 10:54:01 +08:00
Huawei Technologies Co., Ltd
94ac69c182 virdevmapper: Don't use libdevmapper to obtain dependencies
CVE-2020-14339

When building domain's private /dev in a namespace, libdevmapper
is consulted for getting full dependency tree of domain's disks.
The reason is that for a multipath devices all dependent devices
must be created in the namespace and allowed in CGroups.

However, this approach is very fragile as building of namespace
happens in the forked off child process, after mass close of FDs
and just before dropping privileges and execing QEMU. And it so
happens that when calling libdevmapper APIs, one of them opens
/dev/mapper/control and saves the FD into a global variable. The
FD is kept open until the lib is unlinked or dm_lib_release() is
called explicitly. We are doing neither.

However, the virDevMapperGetTargets() function is called also
from libvirtd (when setting up CGroups) and thus has to be thread
safe. Unfortunately, libdevmapper APIs are not thread safe (nor
async signal safe) and thus we can't use them. Reimplement what
libdevmapper would do using plain C (ioctl()-s, /proc/devices
parsing, /dev/mapper dirwalking, and so on).

Fixes: a30078cb832646177defd256e77c632905f1e6d0
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1858260

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>

cherry-pick from commit 22494556542c676d1b9e7f1c1f2ea13ac17e1e3e
Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2021-01-20 10:53:54 +08:00
Huawei Technologies Co., Ltd
6b455e4fb1 util: Move virIsDevMapperDevice() to virdevmapper.c
CVE-2020-14339

When introducing virdevmapper.c (in v4.3.0-rc1~427) I didn't
realize there is a function that calls in devmapper. The function
is called virIsDevMapperDevice() and lives in virutil.c. Now that
we have a special file for handling devmapper move it there.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>

cherry-pick from commit dfa0e118f745fe3f4fe95975c6100f0fc6d788be
Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2021-01-20 10:53:27 +08:00
openeuler-ci-bot
7352d162b9 !38 Automatically generate code patches with openeuler
From: @zhendongchen
Reviewed-by: @yorifang
Signed-off-by: @yorifang
2020-10-27 15:41:52 +08:00
Euler Robot
e60b829457 spec: Update release version with !14
increase release verison by one

Signed-off-by: Euler Robot <euler.robot@huawei.com>
2020-10-26 20:59:55 +08:00
Euler Robot
16330ca79d spec: Update patch and changelog with !14
rpc: gendispatch: handle empty flags
rpc: add support for filtering @acls by uint params
rpc: require write acl for guest agent in virDomainInterfaceAddresses
qemu: agent: set ifname to NULL after freeing

Signed-off-by: Jan Tomko <jtomko@redhat.com>
Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2020-10-26 20:59:55 +08:00
Huawei Technologies Co., Ltd
bc9ee542aa qemu: agent: set ifname to NULL after freeing
CVE-2020-25637

Signed-off-by: Jan Tomko <jtomko@redhat.com>
Rported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Reviewed-by: Mauro Matteo Cascella <mcascell@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>

cherry-pick from commit a63b48c5ecef077bf0f909a85f453a605600cf05
Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2020-10-26 20:59:55 +08:00
Huawei Technologies Co., Ltd
fc93d2b756 rpc: require write acl for guest agent in virDomainInterfaceAddresses
CVE-2020-25637

Add a requirement for domain:write if source is set to
VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_AGENT.

Signed-off-by: Jan Tomko <jtomko@redhat.com>
Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>

cherry-pick from commit e4116eaa44cb366b59f7fe98f4b88d04c04970ad
Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2020-10-26 20:59:55 +08:00
Huawei Technologies Co., Ltd
6cac390357 rpc: add support for filtering @acls by uint params
CVE-2020-25637

Add a new field to @acl annotations for filtering by
unsigned int parameters.

Signed-off-by: Jan Tomko <jtomko@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>

cherry-pick from commit 50864dcda191eb35732dbd80fb6ca251a6bba923
Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2020-10-26 20:59:55 +08:00
Huawei Technologies Co., Ltd
27ef2f13e3 rpc: gendispatch: handle empty flags
CVE-2020-25637

Prepare for omission of the <flagname> in remote_protocol.x
@acl annotations:
 @acl: <object>:<permission>:<flagname>
so that we can add more field after, e.g.:
 @acl: <object>:<permission>::<field>

Signed-off-by: Jan Tomko <jtomko@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>

cherry-pick from commit 955029bd0ad7ef96000f529ac38204a8f4a96401
Signed-off-by: Jiajie Li <lijiajie11@huawei.com>
2020-10-26 20:59:55 +08:00
openeuler-ci-bot
5d4c07442c !34 bugfix: cherry-pick some bugfix patches from openEuler-20.09 branch
From: @zhendongchen
Reviewed-by: @xydong
Signed-off-by: @xydong
2020-09-30 09:19:01 +08:00
AlexChen
b4fd5d3833 libvirt: add the prefix 'libvirt' for some patches
Signed-off-by: AlexChen <alex.chen@huawei.com>
2020-09-29 17:07:13 +08:00
AlexChen
fa8b1908cc libvirt: add the cherry-pick info
Signed-off-by: AlexChen <alex.chen@huawei.com>
2020-09-29 16:59:14 +08:00
AlexChen
811898dff8 cherry-pick some bugfix patches from open source community
cherry-pick patchs list:
2ab8dba5    qemuDomainGetUnplugTimeout: Add G_GNUC_NO_INLINE 
423664a6    virNetDevSwitchdevFeature: Make failure to get 'family_id' non-fatal 
ca616274    virNetDevGetFamilyId: Change signature 
67b973b5    qemuDomainDefPostParse: Fail if unable to fill machine type 
67e19fc9    qemu: Revoke access to mirror on failed blockcopy 
93b15ba0    qemu: fix hang in p2p + xbzrle compression + parallel migration 
a13ac587    util: fix iteration in virSocketAddrResolveService 
88011ed2    libxl: fix crash when initializing driver

Signed-off-by: AlexChen <alex.chen@huawei.com>
2020-09-29 16:59:08 +08:00
hao__wangh
f25125ef95 backport upstream patches 2020-09-29 16:43:19 +08:00
Zeyu Jin
25f331e848 bugfix: backport an upstream patch to fix '/run/libvirt/qemu/dbus' racing bug
There are races condiction to make '/run/libvirt/qemu/dbus' directory in
virDirCreateNoFork() while concurrent start VMs, and get "failed to create
directory '/run/libvirt/qemu/dbus': File exists" error message. pre-create the
dbus directory in qemuStateInitialize.

Signed-off-by: Bihong Yu <yubihong@huawei.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2020-09-29 16:40:36 +08:00
Jin Yan
676ca2f0f6 bugfix: cherry-pick some bugfix patches from open source community
bugfix patches list:
d677de  remote: fix driver name check for libxl driver
075641  systemd: start libvirtd after firewalld iptables services
06fc99  qemuDomainCleanupRun: Actually run cleanup callbacks in reverse order
01626c  virDevMapperGetTargetsImpl: quit early if device is not a devmapper target
006782  qemu: only stop external devices after the domain
42a415  qemuDomainStorageSourcePrivateDispose: Free httpcookie
cc8c29  Don't require secdrivers to implement .domainMoveImageMetadata
0230e3  qemuProcessStop: Use XATTRs to restore seclabels on disks a domain is mirroring into
8fd274  qemuProcessStop: Reattach NVMe disks a domain is mirroring into
55029d  security: don't fail if built without attr support
a5a297  qemu: Skip pre creation of NVMe disks
2a372  Fix some wrong usage of ATTRIBUTE_NONNULL
e728ff  conf: Increase cpuset length limit for CPU pinning
8f58a4  virQEMUDriverConfigNew: Add slash to cfg defaultTLSx509certdir for non-embeded driver
1b22dd  qemuDomainSetNumaParamsLive: set nodeset for root cgroup
bdb8f2  qemu: do not add model when actual iface type is hostdev

Signed-off-by: Jin Yan <jinyan12@huawei.com>
2020-09-29 16:39:38 +08:00
AlexChen
c6f0aa1103 tests/commandtest: skip the test4 and test18 if the testcase is run in the container env
Signed-off-by: AlexChen <alex.chen@huawei.com>
2020-09-29 16:38:35 +08:00
openeuler-ci-bot
10700c86e8 !20 Libvirt : support aarch64 vtpm with parameter tpm-tis-device
Merge pull request !20 from JackJF/master
2020-08-17 17:34:21 +08:00
jiangfangjie
6270529d77 Libvirt : support aarch64 vtpm with parameter tpm-tis-device
Signed-off-by: jiangfangjie <jiangfangjie@huawei.com>
2020-08-05 14:07:13 +08:00
openeuler-ci-bot
883534c2f4 !16 Substitute security_context_t with char
Merge pull request !16 from XuYandong/master
2020-08-05 10:44:01 +08:00
Xu Yandong
2a2765c143 Substitute security_context_t with char *
Replace deprecated security_context_t with char

Signed-off-by: Xu Yandong <xuyandong2@huawei.com>
2020-08-04 09:40:08 +00:00
openeuler-ci-bot
00ca4958ae !14 [feature] Sync codes with openEuler-20.03-LTS
Merge pull request !14 from zhanghailiang/master
2020-06-05 10:49:41 +08:00
openeuler-ci-bot
e27d30f879 !13 cpu_map: introduce Kunpeng-920 cpu features
Merge pull request !13 from XuYandong/cpumap
2020-05-26 21:26:26 +08:00
Xu Yandong
b74becba6a cpu_map: introduce Kunpeng-920 cpu features
Signed-off-by: Xu Yandong <xuyandong2@huawei.com>
2020-05-26 20:31:02 +08:00
openeuler-ci-bot
50c19888c9 !12 Enable host-model cpu mode for AArch64
Merge pull request !12 from XuYandong/hostmodel
2020-05-21 11:51:15 +08:00
Xu Yandong
969e2d6f9a cpu-model: enable 'host-model' cpu mode for AArch64 architecture
Signed-off-by: Xu Yandong <xuyandong2@huawei.com>
2020-05-20 15:16:15 +08:00
openeuler-ci-bot
7330834bd3 !11 Rebase libvirt to version 6.2.0
Merge pull request !11 from XuYandong/ltsuploadv4
2020-05-12 11:40:36 +08:00
Xu Yandong
dd0ef7b0c8 bugfix: fix virsh dump/migrate and virDaemon return code error
Signed-off-by: Xu Yandong <xuyandong2@huawei.com>
2020-05-12 11:14:39 +08:00
Xu Yandong
e471c406f3 cpu: add cpu model support for kunpeng-920
Signed-off-by: Xu Yandong <xuyandong2@huawei.com>
2020-05-12 11:14:30 +08:00
Xu Yandong
72e8bd75f0 cherry-pick bugfixes from version 5.5.0
Signed-off-by: Xu Yandong <xuyandong2@huawei.com>
2020-05-12 09:23:35 +08:00
Xu Yandong
89e3c1a340 Rebase libvirt to version 6.2.0
Signed-off-by: Xu Yandong <xuyandong2@huawei.com>
2020-05-12 09:23:27 +08:00
openeuler-ci-bot
599af213b0 !5 Fix libvirt CVE-2019-20485
Merge pull request !5 from XuYandong/openEuler-20.03-LTS
2020-05-11 09:37:19 +08:00
Xu Yandong
838527c759 Fix CVE-2019-20485
Signed-off-by: Xu Yandong <xuyandong2@huawei.com>
2020-05-09 17:36:19 +08:00
openeuler-ci-bot
6c0fcc7259 !3 [feature] Add template for PR and issues
Merge pull request !3 from zhanghailiang/master
2020-01-13 11:51:35 +08:00
Zhang Hailiang
bca20ca68d PR/issue: Add templates for Issues and PR
Add issue and PR templates to help developers.

Signed-off-by: Zhang Hailiang <zhang.zhanghailiang@huawei.com>
2020-01-13 11:15:23 +08:00
openeuler-ci-bot
3191016abd !2 fix bug which not translate 'running' when use virsh list command in chinese language
Merge pull request !2 from zhanghailiang/master
2020-01-09 21:08:10 +08:00
Xu Yandong
7b5158f8e6 po: refresh translation of "running state"
Signed-off-by: Xu Yandong <xuyandong2@huawei.com>
2020-01-06 15:03:29 +08:00
openeuler-ci-bot
a7c6e5b481 !1 Pick some bugfix patch from libvirt upstream
Merge pull request !1 from openeuler-virt-review/master
2019-12-26 17:23:51 +08:00
Xu Yandong
c94ecc7dd1 sync-patch: cherry pick patches from upstream
Signed-off-by: Xu Yandong <xuyandong2@huawei.com>
2019-12-26 16:17:12 +08:00
Xu Yandong
2c9b2aeb63 cpu_map: cherry pick patches about CVE-2019-11135
Signed-off-by: Xu Yandong <xuyandong2@huawei.com>
2019-12-26 16:16:27 +08:00
dogsheng
66b96aff65 Package init 2019-12-25 15:55:44 +08:00
dogsheng
81c6c6500e Package init 2019-12-13 15:41:47 +08:00
zhuchunyi
6d0c3f9009 update code 2019-11-06 19:40:52 +08:00
overweight
29372b3f10 Package init 2019-09-30 10:58:53 -04:00