diff options
-rw-r--r-- | meta/recipes-core/libxml/libxml2.inc | 1 | ||||
-rw-r--r-- | meta/recipes-core/libxml/libxml2/CVE-2015-7942.patch | 58 |
2 files changed, 59 insertions, 0 deletions
diff --git a/meta/recipes-core/libxml/libxml2.inc b/meta/recipes-core/libxml/libxml2.inc index 840a8eb006..15a2421c38 100644 --- a/meta/recipes-core/libxml/libxml2.inc +++ b/meta/recipes-core/libxml/libxml2.inc | |||
@@ -23,6 +23,7 @@ SRC_URI = "ftp://xmlsoft.org/libxml2/libxml2-${PV}.tar.gz;name=libtar \ | |||
23 | file://libxml-m4-use-pkgconfig.patch \ | 23 | file://libxml-m4-use-pkgconfig.patch \ |
24 | file://libxml2-CVE-2014-3660.patch \ | 24 | file://libxml2-CVE-2014-3660.patch \ |
25 | file://0001-CVE-2015-1819-Enforce-the-reader-to-run-in-constant-.patch \ | 25 | file://0001-CVE-2015-1819-Enforce-the-reader-to-run-in-constant-.patch \ |
26 | file://CVE-2015-7942.patch \ | ||
26 | " | 27 | " |
27 | 28 | ||
28 | BINCONFIG = "${bindir}/xml2-config" | 29 | BINCONFIG = "${bindir}/xml2-config" |
diff --git a/meta/recipes-core/libxml/libxml2/CVE-2015-7942.patch b/meta/recipes-core/libxml/libxml2/CVE-2015-7942.patch new file mode 100644 index 0000000000..738ae94de8 --- /dev/null +++ b/meta/recipes-core/libxml/libxml2/CVE-2015-7942.patch | |||
@@ -0,0 +1,58 @@ | |||
1 | From 9b8512337d14c8ddf662fcb98b0135f225a1c489 Mon Sep 17 00:00:00 2001 | ||
2 | From: Daniel Veillard <veillard@redhat.com> | ||
3 | Date: Mon, 23 Feb 2015 11:29:20 +0800 | ||
4 | Subject: Cleanup conditional section error handling | ||
5 | |||
6 | For https://bugzilla.gnome.org/show_bug.cgi?id=744980 | ||
7 | |||
8 | The error handling of Conditional Section also need to be | ||
9 | straightened as the structure of the document can't be | ||
10 | guessed on a failure there and it's better to stop parsing | ||
11 | as further errors are likely to be irrelevant. | ||
12 | |||
13 | Fixes CVE-2015-7942. | ||
14 | Upstream-Status: Backport | ||
15 | |||
16 | Upstream patch: | ||
17 | https://git.gnome.org/browse/libxml2/commit/ | ||
18 | ?id=9b8512337d14c8ddf662fcb98b0135f225a1c489 | ||
19 | |||
20 | Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com> | ||
21 | --- | ||
22 | parser.c | 6 ++++++ | ||
23 | 1 file changed, 6 insertions(+) | ||
24 | |||
25 | diff --git a/parser.c b/parser.c | ||
26 | index bbe97eb..fe603ac 100644 | ||
27 | --- a/parser.c | ||
28 | +++ b/parser.c | ||
29 | @@ -6770,6 +6770,8 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) { | ||
30 | SKIP_BLANKS; | ||
31 | if (RAW != '[') { | ||
32 | xmlFatalErr(ctxt, XML_ERR_CONDSEC_INVALID, NULL); | ||
33 | + xmlStopParser(ctxt); | ||
34 | + return; | ||
35 | } else { | ||
36 | if (ctxt->input->id != id) { | ||
37 | xmlValidityError(ctxt, XML_ERR_ENTITY_BOUNDARY, | ||
38 | @@ -6830,6 +6832,8 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) { | ||
39 | SKIP_BLANKS; | ||
40 | if (RAW != '[') { | ||
41 | xmlFatalErr(ctxt, XML_ERR_CONDSEC_INVALID, NULL); | ||
42 | + xmlStopParser(ctxt); | ||
43 | + return; | ||
44 | } else { | ||
45 | if (ctxt->input->id != id) { | ||
46 | xmlValidityError(ctxt, XML_ERR_ENTITY_BOUNDARY, | ||
47 | @@ -6885,6 +6889,8 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) { | ||
48 | |||
49 | } else { | ||
50 | xmlFatalErr(ctxt, XML_ERR_CONDSEC_INVALID_KEYWORD, NULL); | ||
51 | + xmlStopParser(ctxt); | ||
52 | + return; | ||
53 | } | ||
54 | |||
55 | if (RAW == 0) | ||
56 | -- | ||
57 | cgit v0.11.2 | ||
58 | |||