2016-05-13 00:13:01 +02:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# Xen
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
package/xen: security bump to version 4.13.1
- Fix CVE-2020-11739: An issue was discovered in Xen through 4.13.x,
allowing guest OS users to cause a denial of service or possibly gain
privileges because of missing memory barriers in read-write unlock
paths. The read-write unlock paths don't contain a memory barrier. On
Arm, this means a processor is allowed to re-order the memory access
with the preceding ones. In other words, the unlock may be seen by
another processor before all the memory accesses within the "critical"
section. As a consequence, it may be possible to have a writer executing
a critical section at the same time as readers or another writer. In
other words, many of the assumptions (e.g., a variable cannot be
modified after a check) in the critical sections are not safe anymore.
The read-write locks are used in hypercalls (such as grant-table ones),
so a malicious guest could exploit the race. For instance, there is a
small window where Xen can leak memory if XENMAPSPACE_grant_table is
used concurrently. A malicious guest may be able to leak memory, or
cause a hypervisor crash resulting in a Denial of Service (DoS).
Information leak and privilege escalation cannot be excluded.
- Fix CVE-2020-11740: An issue was discovered in xenoprof in Xen through
4.13.x, allowing guest OS users (without active profiling) to obtain
sensitive information about other guests. Unprivileged guests can
request to map xenoprof buffers, even if profiling has not been enabled
for those guests. These buffers were not scrubbed.
- Fix CVE-2020-11741: An issue was discovered in xenoprof in Xen through
4.13.x, allowing guest OS users (with active profiling) to obtain
sensitive information about other guests, cause a denial of service, or
possibly gain privileges. For guests for which "active" profiling was
enabled by the administrator, the xenoprof code uses the standard Xen
shared ring structure. Unfortunately, this code did not treat the guest
as a potential adversary: it trusts the guest not to modify buffer size
information or modify head / tail pointers in unexpected ways. This can
crash the host (DoS). Privilege escalation cannot be ruled out.
- Fix CVE-2020-11742: An issue was discovered in Xen through 4.13.x,
allowing guest OS users to cause a denial of service because of bad
continuation handling in GNTTABOP_copy. Grant table operations are
expected to return 0 for success, and a negative number for errors. The
fix for CVE-2017-12135 introduced a path through grant copy handling
where success may be returned to the caller without any action taken. In
particular, the status fields of individual operations are left
uninitialised, and may result in errant behaviour in the caller of
GNTTABOP_copy. A buggy or malicious guest can construct its grant table
in such a way that, when a backend domain tries to copy a grant, it hits
the incorrect exit path. This returns success to the caller without
doing anything, which may cause crashes or other incorrect behaviour.
- Fix CVE-2020-11743: An issue was discovered in Xen through 4.13.x,
allowing guest OS users to cause a denial of service because of a bad
error path in GNTTABOP_map_grant. Grant table operations are expected to
return 0 for success, and a negative number for errors. Some misplaced
brackets cause one error path to return 1 instead of a negative value.
The grant table code in Linux treats this condition as success, and
proceeds with incorrectly initialised state. A buggy or malicious guest
can construct its grant table in such a way that, when a backend domain
tries to map a grant, it hits the incorrect error path. This will crash
a Linux based dom0 or backend domain.
https://xenproject.org/downloads/xen-project-archives/xen-project-4-13-series/xen-project-4-13-1
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-05-30 14:25:32 +02:00
|
|
|
XEN_VERSION = 4.13.1
|
2017-06-30 01:32:47 +02:00
|
|
|
XEN_SITE = https://downloads.xenproject.org/release/xen/$(XEN_VERSION)
|
2017-03-30 15:43:32 +02:00
|
|
|
XEN_LICENSE = GPL-2.0
|
2016-05-13 00:13:01 +02:00
|
|
|
XEN_LICENSE_FILES = COPYING
|
2020-02-04 22:08:55 +01:00
|
|
|
XEN_DEPENDENCIES = host-acpica host-python3
|
2016-05-13 00:13:01 +02:00
|
|
|
|
|
|
|
# Calculate XEN_ARCH
|
|
|
|
ifeq ($(ARCH),aarch64)
|
|
|
|
XEN_ARCH = arm64
|
|
|
|
else ifeq ($(ARCH),arm)
|
|
|
|
XEN_ARCH = arm32
|
|
|
|
endif
|
|
|
|
|
2018-05-13 18:59:23 +02:00
|
|
|
XEN_CONF_OPTS = \
|
|
|
|
--disable-ocamltools \
|
|
|
|
--with-initddir=/etc/init.d
|
2016-08-13 00:30:05 +02:00
|
|
|
|
2020-02-04 22:08:55 +01:00
|
|
|
XEN_CONF_ENV = PYTHON=$(HOST_DIR)/bin/python3
|
2016-05-13 00:13:01 +02:00
|
|
|
XEN_MAKE_ENV = \
|
|
|
|
XEN_TARGET_ARCH=$(XEN_ARCH) \
|
|
|
|
CROSS_COMPILE=$(TARGET_CROSS) \
|
2017-04-12 16:54:13 +02:00
|
|
|
HOST_EXTRACFLAGS="-Wno-error" \
|
package/xen: explicitly disable checkpolicy logic
Fixes:
http://autobuild.buildroot.net/results/14af2dc3219847a92c6ec2db14ba387159b61fde
The Xen build system builds and embeds a default XSM FLASK (Flux Advanced
Security Kernel) security policy if it detects SELinux checkpolicy on the
build machine.
If enabled, a gen-policy.py python script is used to convert the binary
FLASK policy to a C array initialization list to embed it in the Xen binary.
Depending on the python version and locale available on the host, this fails
with byte values outside the 0..255 range:
policy.c:7:10: error: unsigned conversion from 'int' to 'unsigned char' changes value from '56575' to '255' [-Werror=overflow]
0xdc8c, 0xdcff, 0x7c, 0xdcf9, 0x08, 0x00, 0x00, 0x00, 0x58, 0x65, 0x6e, 0x46, 0x6c,
To fix this and ensure a consistent build, pass XEN_HAS_CHECKPOLICY=n to
disable the checkpolicy detection.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2020-01-19 18:03:56 +01:00
|
|
|
XEN_HAS_CHECKPOLICY=n \
|
2016-05-13 00:13:01 +02:00
|
|
|
$(TARGET_CONFIGURE_OPTS)
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_XEN_HYPERVISOR),y)
|
|
|
|
XEN_MAKE_OPTS += dist-xen
|
|
|
|
XEN_INSTALL_IMAGES = YES
|
|
|
|
define XEN_INSTALL_IMAGES_CMDS
|
|
|
|
cp $(@D)/xen/xen $(BINARIES_DIR)
|
|
|
|
endef
|
|
|
|
else
|
|
|
|
XEN_CONF_OPTS += --disable-xen
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_XEN_TOOLS),y)
|
|
|
|
XEN_DEPENDENCIES += dtc libaio libglib2 ncurses openssl pixman util-linux yajl
|
|
|
|
ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y)
|
|
|
|
XEN_DEPENDENCIES += argp-standalone
|
|
|
|
endif
|
|
|
|
XEN_INSTALL_TARGET_OPTS += DESTDIR=$(TARGET_DIR) install-tools
|
|
|
|
XEN_MAKE_OPTS += dist-tools
|
2018-09-04 21:13:47 +02:00
|
|
|
XEN_CONF_OPTS += --with-extra-qemuu-configure-args="--disable-sdl --disable-opengl"
|
2016-05-13 00:13:01 +02:00
|
|
|
|
|
|
|
define XEN_INSTALL_INIT_SYSV
|
|
|
|
mv $(TARGET_DIR)/etc/init.d/xencommons $(TARGET_DIR)/etc/init.d/S50xencommons
|
|
|
|
mv $(TARGET_DIR)/etc/init.d/xen-watchdog $(TARGET_DIR)/etc/init.d/S50xen-watchdog
|
|
|
|
mv $(TARGET_DIR)/etc/init.d/xendomains $(TARGET_DIR)/etc/init.d/S60xendomains
|
|
|
|
endef
|
|
|
|
else
|
|
|
|
XEN_INSTALL_TARGET = NO
|
|
|
|
XEN_CONF_OPTS += --disable-tools
|
|
|
|
endif
|
|
|
|
|
|
|
|
$(eval $(autotools-package))
|