[Pkg-libvirt-commits] [libvirt] 01/02: LSN-2014-0003: Don't expand entities when parsing XML

Guido Guenther agx at moszumanska.debian.org
Tue May 6 12:12:07 UTC 2014


This is an automated email from the git hooks/post-receive script.

agx pushed a commit to annotated tag debian/1.2.4-1
in repository libvirt.

commit 726b0bb6c486ff3e1908828d3b5736c2154b3227
Author: Guido Günther <agx at sigxcpu.org>
Date:   Mon May 5 10:57:58 2014 +0200

    LSN-2014-0003: Don't expand entities when parsing XML
---
 ...03-Don-t-expand-entities-when-parsing-XML.patch | 35 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 36 insertions(+)

diff --git a/debian/patches/security/LSN-2014-0003-Don-t-expand-entities-when-parsing-XML.patch b/debian/patches/security/LSN-2014-0003-Don-t-expand-entities-when-parsing-XML.patch
new file mode 100644
index 0000000..833c3bf
--- /dev/null
+++ b/debian/patches/security/LSN-2014-0003-Don-t-expand-entities-when-parsing-XML.patch
@@ -0,0 +1,35 @@
+From: "Daniel P. Berrange" <berrange at redhat.com>
+Date: Tue, 15 Apr 2014 11:20:29 +0100
+Subject: LSN-2014-0003: Don't expand entities when parsing XML
+
+If the XML_PARSE_NOENT flag is passed to libxml2, then any
+entities in the input document will be fully expanded. This
+allows the user to read arbitrary files on the host machine
+by creating an entity pointing to a local file. Removing
+the XML_PARSE_NOENT flag means that any entities are left
+unchanged by the parser, or expanded to "" by the XPath
+APIs.
+
+Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
+---
+ src/util/virxml.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/util/virxml.c b/src/util/virxml.c
+index 9f00f62..34af64a 100644
+--- a/src/util/virxml.c
++++ b/src/util/virxml.c
+@@ -746,11 +746,11 @@ virXMLParseHelper(int domcode,
+ 
+     if (filename) {
+         xml = xmlCtxtReadFile(pctxt, filename, NULL,
+-                              XML_PARSE_NOENT | XML_PARSE_NONET |
++                              XML_PARSE_NONET |
+                               XML_PARSE_NOWARNING);
+     } else {
+         xml = xmlCtxtReadDoc(pctxt, BAD_CAST xmlStr, url, NULL,
+-                             XML_PARSE_NOENT | XML_PARSE_NONET |
++                             XML_PARSE_NONET |
+                              XML_PARSE_NOWARNING);
+     }
+     if (!xml)
diff --git a/debian/patches/series b/debian/patches/series
index 5e1efae..0d4c9bb 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -12,3 +12,4 @@ debian/Debianize-systemd-service-files.patch
 Allow-xen-toolstack-to-find-it-s-binaries.patch
 Skip-vircgrouptest.patch
 Include-param.h-on-kFreeBSD.patch
+security/LSN-2014-0003-Don-t-expand-entities-when-parsing-XML.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libvirt.git



More information about the Pkg-libvirt-commits mailing list