Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
libvirt
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Libvirt Packaging Team
libvirt
Commits
726b0bb6
Commit
726b0bb6
authored
11 years ago
by
Guido Günther
Browse files
Options
Downloads
Patches
Plain Diff
LSN-2014-0003: Don't expand entities when parsing XML
parent
8388a281
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
debian/patches/security/LSN-2014-0003-Don-t-expand-entities-when-parsing-XML.patch
+35
-0
35 additions, 0 deletions
...SN-2014-0003-Don-t-expand-entities-when-parsing-XML.patch
debian/patches/series
+1
-0
1 addition, 0 deletions
debian/patches/series
with
36 additions
and
0 deletions
debian/patches/security/LSN-2014-0003-Don-t-expand-entities-when-parsing-XML.patch
0 → 100644
+
35
−
0
View file @
726b0bb6
From: "Daniel P. Berrange" <berrange@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@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)
This diff is collapsed.
Click to expand it.
debian/patches/series
+
1
−
0
View file @
726b0bb6
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment