~ubuntu-branches/ubuntu/utopic/libxml2/utopic

« back to all changes in this revision

Viewing changes to debian/patches/0032-Fix-regressions-introduced-by-CVE-2014-0191-patch.patch

  • Committer: Package Import Robot
  • Author(s): Aron Xu, Christian Svensson, Daniel Schepler, Helmut Grohne, Adam Conrad, Matthias Klose, Aron Xu
  • Date: 2014-07-09 05:40:15 UTC
  • mto: This revision was merged to the branch mainline in revision 75.
  • Revision ID: package-import@ubuntu.com-20140709054015-rdnfjxrf3zvmw6l7
[ Christian Svensson ]
* Do not build-depend on readline (Closes: #742350)

[ Daniel Schepler ]
* Patch to bootstrap without python (Closes: #738080)

[ Helmut Grohne ]
* Drop unneeded B-D on perl and binutils (Closes: #753005)

[ Adam Conrad ]
* Actually run dh_autoreconf, which the old/new mixed rules file misses.

[ Matthias Klose ]
* Add patch to fix python multiarch issue
* Allow the package to cross-build by tweaking B-Ds on python
* Set PYTHON_LIBS for cross builds

[ Aron Xu ]
* Use correct $CC
* Configure udeb without python
* New round of cherry-picking upstream fixes
  - Includes fixes for CVE-2014-0191 (Closes: #747309).
* Call prename with -vf
* Require python-all-dev (>= 2.7.5-5~)
* Bump std-ver: 3.9.4 -> 3.9.5, no change

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From: Daniel Veillard <veillard@redhat.com>
 
2
Date: Wed, 11 Jun 2014 16:54:32 +0800
 
3
Subject: Fix regressions introduced by CVE-2014-0191 patch
 
4
 
 
5
A number of issues have been raised after the fix, and this patch
 
6
tries to correct all of them, though most were related to
 
7
postvalidation.
 
8
https://bugzilla.gnome.org/show_bug.cgi?id=730290
 
9
and other reports on list, off-list and on Red Hat bugzilla
 
10
---
 
11
 parser.c |   13 +++++++++++--
 
12
 1 file changed, 11 insertions(+), 2 deletions(-)
 
13
 
 
14
diff --git a/parser.c b/parser.c
 
15
index 8aad7b4..ea0ea65 100644
 
16
--- a/parser.c
 
17
+++ b/parser.c
 
18
@@ -2595,8 +2595,8 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) {
 
19
                    xmlCharEncoding enc;
 
20
 
 
21
                    /*
 
22
-                    * Note: external parsed entities will not be loaded, it is
 
23
-                    * not required for a non-validating parser, unless the
 
24
+                    * Note: external parameter entities will not be loaded, it
 
25
+                    * is not required for a non-validating parser, unless the
 
26
                     * option of validating, or substituting entities were
 
27
                     * given. Doing so is far more secure as the parser will
 
28
                     * only process data coming from the document entity by
 
29
@@ -2605,6 +2605,9 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) {
 
30
                     if ((entity->etype == XML_EXTERNAL_PARAMETER_ENTITY) &&
 
31
                        ((ctxt->options & XML_PARSE_NOENT) == 0) &&
 
32
                        ((ctxt->options & XML_PARSE_DTDVALID) == 0) &&
 
33
+                       ((ctxt->options & XML_PARSE_DTDLOAD) == 0) &&
 
34
+                       ((ctxt->options & XML_PARSE_DTDATTR) == 0) &&
 
35
+                       (ctxt->replaceEntities == 0) &&
 
36
                        (ctxt->validate == 0))
 
37
                        return;
 
38
 
 
39
@@ -12609,6 +12612,9 @@ xmlIOParseDTD(xmlSAXHandlerPtr sax, xmlParserInputBufferPtr input,
 
40
        return(NULL);
 
41
     }
 
42
 
 
43
+    /* We are loading a DTD */
 
44
+    ctxt->options |= XML_PARSE_DTDLOAD;
 
45
+
 
46
     /*
 
47
      * Set-up the SAX context
 
48
      */
 
49
@@ -12736,6 +12742,9 @@ xmlSAXParseDTD(xmlSAXHandlerPtr sax, const xmlChar *ExternalID,
 
50
        return(NULL);
 
51
     }
 
52
 
 
53
+    /* We are loading a DTD */
 
54
+    ctxt->options |= XML_PARSE_DTDLOAD;
 
55
+
 
56
     /*
 
57
      * Set-up the SAX context
 
58
      */