Index: branches/2017Q1/sysutils/xen-tools/Makefile =================================================================== --- branches/2017Q1/sysutils/xen-tools/Makefile (revision 434568) +++ branches/2017Q1/sysutils/xen-tools/Makefile (revision 434569) @@ -1,86 +1,86 @@ # $FreeBSD$ PORTNAME= xen PKGNAMESUFFIX= -tools PORTVERSION= 4.7.1 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= sysutils emulators MASTER_SITES= http://downloads.xenproject.org/release/xen/${PORTVERSION}/ MAINTAINER= royger@FreeBSD.org COMMENT= Xen management tool, based on LibXenlight LICENSE= GPLv2 LGPL3 LICENSE_COMB= multi BROKEN_FreeBSD_10= does not build LIB_DEPENDS= libyajl.so:devel/yajl \ liblzo2.so:archivers/lzo2 \ libpixman-1.so:x11/pixman \ libargp.so:devel/argp-standalone BUILD_DEPENDS= dev86>0:devel/dev86 \ seabios>0:misc/seabios \ markdown>0:textproc/markdown OPTIONS_DEFINE= DOCS ONLY_FOR_ARCHS= amd64 ONLY_FOR_ARCHS_REASON= "not yet ported to anything other than amd64" USES= cpe gettext gmake libtool localbase:ldflags perl5 pkgconfig \ python shebangfix USE_GNOME= glib20 USE_LDCONFIG= yes GNU_CONFIGURE= yes MAKE_ARGS= clang=y QEMU_ARGS= --disable-gtk \ --disable-smartcard-nss \ --disable-sdl \ --disable-vte \ --disable-curses \ --disable-tools \ --disable-curl \ --cxx=c++ EXTRA_PATCHES= ${FILESDIR}/var_paths.patch:-p1 \ ${FILESDIR}/xsa198.patch:-p1 \ ${FILESDIR}/0001-libxl-fix-creation-of-pkgconf-install-dir.patch \ ${FILESDIR}/0001-tools-configure-fix-pkg-config-install-path-for-Free.patch \ ${FILESDIR}/0001-libs-xenstore-set-correct-FreeBSD-device.patch CONFIGURE_ARGS+= --with-extra-qemuu-configure-args="${QEMU_ARGS}" \ --with-system-seabios=${LOCALBASE}/share/seabios/bios.bin # Disable bash and xgettext tests, they are not needed on FreeBSD. CONFIGURE_ENV+= ac_cv_path_BASH=${TRUE} SHEBANG_FILES= tools/misc/xencov_split \ tools/misc/xen-ringwatch ALL_TARGET= tools docs INSTALL_TARGET= install-tools install-docs .include .if ${OPSYS} != FreeBSD IGNORE= only supported on FreeBSD .endif post-patch: @${REINPLACE_CMD} "s,x86_64,amd64,g" ${WRKSRC}/tools/configure @${REINPLACE_CMD} -e "s,/var/lib,/var/db,g" \ ${WRKSRC}/tools/Makefile \ ${WRKSRC}/tools/libxc/include/xenguest.h \ ${WRKSRC}/tools/libxl/libxl_dom.c \ ${WRKSRC}/tools/libxl/libxl_dm.c \ ${WRKSRC}/tools/qemu-xen-traditional/i386-dm/helper2.c \ ${WRKSRC}/docs/man/* @for p in `ls ${FILESDIR}/*qemuu*.patch 2>/dev/null`; do \ ${ECHO_CMD} "====> Applying $${p##*/}" ; \ ${PATCH} -s -p1 -i $${p} -d ${WRKSRC}/tools/qemu-xen ; \ done post-install: ${MKDIR} ${STAGEDIR}/var/run/xen .include Index: branches/2017Q1/sysutils/xen-tools/files/xsa209-qemuu.patch =================================================================== --- branches/2017Q1/sysutils/xen-tools/files/xsa209-qemuu.patch (nonexistent) +++ branches/2017Q1/sysutils/xen-tools/files/xsa209-qemuu.patch (revision 434569) @@ -0,0 +1,57 @@ +From: Gerd Hoffmann +Subject: [PATCH 3/3] cirrus: add blit_is_unsafe call to cirrus_bitblt_cputovideo + +CIRRUS_BLTMODE_MEMSYSSRC blits do NOT check blit destination +and blit width, at all. Oops. Fix it. + +Security impact: high. + +The missing blit destination check allows to write to host memory. +Basically same as CVE-2014-8106 for the other blit variants. + +The missing blit width check allows to overflow cirrus_bltbuf, +with the attractive target cirrus_srcptr (current cirrus_bltbuf write +position) being located right after cirrus_bltbuf in CirrusVGAState. + +Due to cirrus emulation writing cirrus_bltbuf bytewise the attacker +hasn't full control over cirrus_srcptr though, only one byte can be +changed. Once the first byte has been modified further writes land +elsewhere. + +[ This is CVE-2017-2620 / XSA-209 - Ian Jackson ] + +Reported-by: Gerd Hoffmann +Signed-off-by: Gerd Hoffmann +--- + hw/display/cirrus_vga.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c +index 0e47cf8..a093dc8 100644 +--- a/hw/display/cirrus_vga.c ++++ b/hw/display/cirrus_vga.c +@@ -899,6 +899,10 @@ static int cirrus_bitblt_cputovideo(CirrusVGAState * s) + { + int w; + ++ if (blit_is_unsafe(s, true)) { ++ return 0; ++ } ++ + s->cirrus_blt_mode &= ~CIRRUS_BLTMODE_MEMSYSSRC; + s->cirrus_srcptr = &s->cirrus_bltbuf[0]; + s->cirrus_srcptr_end = &s->cirrus_bltbuf[0]; +@@ -924,6 +928,10 @@ static int cirrus_bitblt_cputovideo(CirrusVGAState * s) + } + s->cirrus_srccounter = s->cirrus_blt_srcpitch * s->cirrus_blt_height; + } ++ ++ /* the blit_is_unsafe call above should catch this */ ++ assert(s->cirrus_blt_srcpitch <= CIRRUS_BLTBUFSIZE); ++ + s->cirrus_srcptr = s->cirrus_bltbuf; + s->cirrus_srcptr_end = s->cirrus_bltbuf + s->cirrus_blt_srcpitch; + cirrus_update_memory_access(s); +-- +1.8.3.1 + Property changes on: branches/2017Q1/sysutils/xen-tools/files/xsa209-qemuu.patch ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2017Q1 =================================================================== --- branches/2017Q1 (revision 434568) +++ branches/2017Q1 (revision 434569) Property changes on: branches/2017Q1 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r434523