summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGyorgy Sarvari <skandigraun@gmail.com>2026-01-12 12:20:12 +0100
committerGyorgy Sarvari <skandigraun@gmail.com>2026-01-20 18:21:58 +0100
commit7b4d42c6406233801fe64fbe3caaa5e45e3e7658 (patch)
tree0abe95bbb4cca4c6d56274f62d2ccca766296dd2
parent8f5f5cf4b335a09313c48394c62bfb614868fc1e (diff)
downloadmeta-openembedded-7b4d42c6406233801fe64fbe3caaa5e45e3e7658.tar.gz
raptor2: patch CVE-2017-18926
Details: https://nvd.nist.gov/vuln/detail/CVE-2017-18926 NVD advisory mentions the original announcement on oss-security mailing list[1]. This mentions a bug link[2] related to this vulnerability. The bug mentions the revision of the fix - pick that patch from the project's git repository. [1]: https://www.openwall.com/lists/oss-security/2017/06/07/1 [2]: https://bugs.librdf.org/mantis/view.php?id=617 Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
-rw-r--r--meta-oe/recipes-support/raptor2/files/CVE-2017-18926.patch44
-rw-r--r--meta-oe/recipes-support/raptor2/raptor2_2.0.15.bb8
2 files changed, 48 insertions, 4 deletions
diff --git a/meta-oe/recipes-support/raptor2/files/CVE-2017-18926.patch b/meta-oe/recipes-support/raptor2/files/CVE-2017-18926.patch
new file mode 100644
index 0000000000..f3211c899b
--- /dev/null
+++ b/meta-oe/recipes-support/raptor2/files/CVE-2017-18926.patch
@@ -0,0 +1,44 @@
1From 686fc0608480f4b2d2f8c60717141ad8e3c5a849 Mon Sep 17 00:00:00 2001
2From: Dave Beckett <dave@dajobe.org>
3Date: Sun, 16 Apr 2017 23:15:12 +0100
4Subject: [PATCH] Calcualte max nspace declarations correctly for XML writer
5
6(raptor_xml_writer_start_element_common): Calculate max including for
7each attribute a potential name and value.
8
9Fixes Issues #0000617 http://bugs.librdf.org/mantis/view.php?id=617
10and #0000618 http://bugs.librdf.org/mantis/view.php?id=618
11
12CVE: CVE-2017-18926
13Upstream-Status: Backport [https://github.com/dajobe/raptor/commit/590681e546cd9aa18d57dc2ea1858cb734a3863f]
14Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
15---
16 src/raptor_xml_writer.c | 7 ++++---
17 1 file changed, 4 insertions(+), 3 deletions(-)
18
19diff --git a/src/raptor_xml_writer.c b/src/raptor_xml_writer.c
20index 693b946..0d3a36a 100644
21--- a/src/raptor_xml_writer.c
22+++ b/src/raptor_xml_writer.c
23@@ -181,9 +181,10 @@ raptor_xml_writer_start_element_common(raptor_xml_writer* xml_writer,
24 size_t nspace_declarations_count = 0;
25 unsigned int i;
26
27- /* max is 1 per element and 1 for each attribute + size of declared */
28 if(nstack) {
29- int nspace_max_count = element->attribute_count+1;
30+ int nspace_max_count = element->attribute_count * 2; /* attr and value */
31+ if(element->name->nspace)
32+ nspace_max_count++;
33 if(element->declared_nspaces)
34 nspace_max_count += raptor_sequence_size(element->declared_nspaces);
35 if(element->xml_language)
36@@ -237,7 +238,7 @@ raptor_xml_writer_start_element_common(raptor_xml_writer* xml_writer,
37 }
38 }
39
40- /* Add the attribute + value */
41+ /* Add the attribute's value */
42 nspace_declarations[nspace_declarations_count].declaration=
43 raptor_qname_format_as_xml(element->attributes[i],
44 &nspace_declarations[nspace_declarations_count].length);
diff --git a/meta-oe/recipes-support/raptor2/raptor2_2.0.15.bb b/meta-oe/recipes-support/raptor2/raptor2_2.0.15.bb
index 577c6ee00a..193cf13b21 100644
--- a/meta-oe/recipes-support/raptor2/raptor2_2.0.15.bb
+++ b/meta-oe/recipes-support/raptor2/raptor2_2.0.15.bb
@@ -9,10 +9,10 @@ LIC_FILES_CHKSUM = " \
9 9
10DEPENDS = "libxml2 libxslt curl yajl" 10DEPENDS = "libxml2 libxslt curl yajl"
11 11
12SRC_URI = " \ 12SRC_URI = "http://download.librdf.org/source/${BPN}-${PV}.tar.gz \
13 http://download.librdf.org/source/${BPN}-${PV}.tar.gz \ 13 file://0001-configure.ac-do-additional-checks-on-libxml2-also-wh.patch \
14 file://0001-configure.ac-do-additional-checks-on-libxml2-also-wh.patch \ 14 file://CVE-2017-18926.patch \
15" 15 "
16SRC_URI[md5sum] = "a39f6c07ddb20d7dd2ff1f95fa21e2cd" 16SRC_URI[md5sum] = "a39f6c07ddb20d7dd2ff1f95fa21e2cd"
17SRC_URI[sha256sum] = "ada7f0ba54787b33485d090d3d2680533520cd4426d2f7fb4782dd4a6a1480ed" 17SRC_URI[sha256sum] = "ada7f0ba54787b33485d090d3d2680533520cd4426d2f7fb4782dd4a6a1480ed"
18 18