forked from pool/libxml2
Accepting request 236358 from home:vitezslav_cizek:branches:devel:libraries:c_c++
- temporarily reverting the CVE-2014-0191 patch until there is a fix that doesn't break other applications We did the same with the security update. OBS-URL: https://build.opensuse.org/request/show/236358 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libxml2?expand=0&rev=89
This commit is contained in:
committed by
Git OBS Bridge
parent
72c9a07064
commit
5fabfa5e31
@@ -1,59 +0,0 @@
|
|||||||
From 9cd1c3cfbd32655d60572c0a413e017260c854df Mon Sep 17 00:00:00 2001
|
|
||||||
From: Daniel Veillard <veillard@redhat.com>
|
|
||||||
Date: Tue, 22 Apr 2014 15:30:56 +0800
|
|
||||||
Subject: Do not fetch external parameter entities
|
|
||||||
|
|
||||||
Unless explicitely asked for when validating or replacing entities
|
|
||||||
with their value. Problem pointed out by Daniel Berrange <berrange@redhat.com>
|
|
||||||
|
|
||||||
From 7c3c663e4f844aaecbb0cfc29567fe2ee9506fc4 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Alexandre Rostovtsev <tetromino@gentoo.org>
|
|
||||||
Date: Fri, 16 May 2014 22:46:00 -0400
|
|
||||||
Subject: [PATCH] xmllint: a posteriori validation needs to load exernal
|
|
||||||
entities
|
|
||||||
|
|
||||||
For https://bugzilla.gnome.org/show_bug.cgi?id=730290
|
|
||||||
|
|
||||||
Index: libxml2-2.9.1/parser.c
|
|
||||||
===================================================================
|
|
||||||
--- libxml2-2.9.1.orig/parser.c 2013-04-16 15:39:18.000000000 +0200
|
|
||||||
+++ libxml2-2.9.1/parser.c 2014-05-23 11:26:43.344897186 +0200
|
|
||||||
@@ -2595,6 +2595,20 @@ xmlParserHandlePEReference(xmlParserCtxt
|
|
||||||
xmlCharEncoding enc;
|
|
||||||
|
|
||||||
/*
|
|
||||||
+ * Note: external parsed entities will not be loaded, it is
|
|
||||||
+ * not required for a non-validating parser, unless the
|
|
||||||
+ * option of validating, or substituting entities were
|
|
||||||
+ * given. Doing so is far more secure as the parser will
|
|
||||||
+ * only process data coming from the document entity by
|
|
||||||
+ * default.
|
|
||||||
+ */
|
|
||||||
+ if ((entity->etype == XML_EXTERNAL_PARAMETER_ENTITY) &&
|
|
||||||
+ ((ctxt->options & XML_PARSE_NOENT) == 0) &&
|
|
||||||
+ ((ctxt->options & XML_PARSE_DTDVALID) == 0) &&
|
|
||||||
+ (ctxt->validate == 0))
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ /*
|
|
||||||
* handle the extra spaces added before and after
|
|
||||||
* c.f. http://www.w3.org/TR/REC-xml#as-PE
|
|
||||||
* this is done independently.
|
|
||||||
Index: libxml2-2.9.1/xmllint.c
|
|
||||||
===================================================================
|
|
||||||
--- libxml2-2.9.1.orig/xmllint.c 2013-03-27 04:31:47.000000000 +0100
|
|
||||||
+++ libxml2-2.9.1/xmllint.c 2014-05-23 11:26:43.344897186 +0200
|
|
||||||
@@ -3505,7 +3505,12 @@ main(int argc, char **argv) {
|
|
||||||
xmlLoadExtDtdDefaultValue |= XML_COMPLETE_ATTRS;
|
|
||||||
if (noent != 0) xmlSubstituteEntitiesDefault(1);
|
|
||||||
#ifdef LIBXML_VALID_ENABLED
|
|
||||||
- if (valid != 0) xmlDoValidityCheckingDefaultValue = 1;
|
|
||||||
+ /* If we will validate only a posteriori, ensure that entities get loaded,
|
|
||||||
+ * but suppress validation messages during initial parsing */
|
|
||||||
+ if (postvalid != 0 && valid == 0)
|
|
||||||
+ options |= XML_PARSE_DTDVALID | XML_PARSE_NOERROR | XML_PARSE_NOWARNING;
|
|
||||||
+ else if (valid != 0)
|
|
||||||
+ xmlDoValidityCheckingDefaultValue = 1;
|
|
||||||
#endif /* LIBXML_VALID_ENABLED */
|
|
||||||
if ((htmlout) && (!nowrap)) {
|
|
||||||
xmlGenericError(xmlGenericErrorContext,
|
|
||||||
@@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jun 5 08:30:58 UTC 2014 - vcizek@suse.com
|
||||||
|
|
||||||
|
- temporarily reverting the CVE-2014-0191 patch until there is a fix
|
||||||
|
that doesn't break other applications
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri May 23 15:01:54 UTC 2014 - vcizek@suse.com
|
Fri May 23 15:01:54 UTC 2014 - vcizek@suse.com
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ Url: http://xmlsoft.org
|
|||||||
Source: ftp://xmlsoft.org/libxml2/%{name}-%{version}.tar.gz
|
Source: ftp://xmlsoft.org/libxml2/%{name}-%{version}.tar.gz
|
||||||
Source2: baselibs.conf
|
Source2: baselibs.conf
|
||||||
Patch0: fix-perl.diff
|
Patch0: fix-perl.diff
|
||||||
Patch1: libxml2-CVE-2014-0191.patch
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: pkg-config
|
BuildRequires: pkg-config
|
||||||
BuildRequires: readline-devel
|
BuildRequires: readline-devel
|
||||||
@@ -124,7 +123,6 @@ progress.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0
|
%patch0
|
||||||
%patch1 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --disable-static \
|
%configure --disable-static \
|
||||||
|
|||||||
Reference in New Issue
Block a user