summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Sakoman <steve@sakoman.com>2022-11-15 06:33:26 -1000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-11-24 15:30:00 +0000
commit4c5ac60f32f7106b81e22f4a9cc53a18cc6f94ad (patch)
treef9809b3c420770a2c1cb56ef5228bd193a12c262
parent277e97deb2e4f87aaed5ae52e28035ffb72866fc (diff)
downloadpoky-4c5ac60f32f7106b81e22f4a9cc53a18cc6f94ad.tar.gz
Revert "expat: backport the fix for CVE-2022-43680"
Prepare for version bump which includes this fix This reverts commit 791fe354e5887af3fa3d3f772fafacc5eaedca21. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/expat/expat/CVE-2022-43680.patch33
-rw-r--r--meta/recipes-core/expat/expat_2.4.9.bb1
2 files changed, 0 insertions, 34 deletions
diff --git a/meta/recipes-core/expat/expat/CVE-2022-43680.patch b/meta/recipes-core/expat/expat/CVE-2022-43680.patch
deleted file mode 100644
index 76c55edc76..0000000000
--- a/meta/recipes-core/expat/expat/CVE-2022-43680.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1CVE: CVE-2022-43680
2Upstream-Status: Backport [5290462a7ea1278a8d5c0d5b2860d4e244f997e4]
3Signed-off-by: Ross Burton <ross.burton@arm.com>
4
5From 5290462a7ea1278a8d5c0d5b2860d4e244f997e4 Mon Sep 17 00:00:00 2001
6From: Sebastian Pipping <sebastian@pipping.org>
7Date: Tue, 20 Sep 2022 02:44:34 +0200
8Subject: [PATCH] lib: Fix overeager DTD destruction in
9 XML_ExternalEntityParserCreate
10
11---
12 expat/lib/xmlparse.c | 8 ++++++++
13 1 file changed, 8 insertions(+)
14
15diff --git a/lib/xmlparse.c b/lib/xmlparse.c
16index aacd6e7fc..57bf103cc 100644
17--- a/lib/xmlparse.c
18+++ b/lib/xmlparse.c
19@@ -1068,6 +1068,14 @@ parserCreate(const XML_Char *encodingName,
20 parserInit(parser, encodingName);
21
22 if (encodingName && ! parser->m_protocolEncodingName) {
23+ if (dtd) {
24+ // We need to stop the upcoming call to XML_ParserFree from happily
25+ // destroying parser->m_dtd because the DTD is shared with the parent
26+ // parser and the only guard that keeps XML_ParserFree from destroying
27+ // parser->m_dtd is parser->m_isParamEntity but it will be set to
28+ // XML_TRUE only later in XML_ExternalEntityParserCreate (or not at all).
29+ parser->m_dtd = NULL;
30+ }
31 XML_ParserFree(parser);
32 return NULL;
33 }
diff --git a/meta/recipes-core/expat/expat_2.4.9.bb b/meta/recipes-core/expat/expat_2.4.9.bb
index 22f9845a99..cb007708c7 100644
--- a/meta/recipes-core/expat/expat_2.4.9.bb
+++ b/meta/recipes-core/expat/expat_2.4.9.bb
@@ -9,7 +9,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=7b3b078238d0901d3b339289117cb7fb"
9VERSION_TAG = "${@d.getVar('PV').replace('.', '_')}" 9VERSION_TAG = "${@d.getVar('PV').replace('.', '_')}"
10 10
11SRC_URI = "https://github.com/libexpat/libexpat/releases/download/R_${VERSION_TAG}/expat-${PV}.tar.bz2 \ 11SRC_URI = "https://github.com/libexpat/libexpat/releases/download/R_${VERSION_TAG}/expat-${PV}.tar.bz2 \
12 file://CVE-2022-43680.patch \
13 file://run-ptest \ 12 file://run-ptest \
14 " 13 "
15 14