From: Michael Olbrich <mol@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Alexander Dahl <ada@thorsis.com>
Subject: Re: [ptxdist] [4/4] libxml2: Add upstream patch fixing CVE-2019-20388
Date: Fri, 27 Mar 2020 10:52:26 +0100 [thread overview]
Message-ID: <E1jHlf8-0000Fe-8x@dude02.lab.pengutronix.de> (raw)
In-Reply-To: <20200318132716.10624-5-ada@thorsis.com>
Thanks, applied.
Michael
[sent from post-receive hook]
On Fri, 27 Mar 2020 10:52:26 +0100, Alexander Dahl <ada@thorsis.com> wrote:
> Signed-off-by: Alexander Dahl <ada@thorsis.com>
> ---
> ...mory-leak-in-xmlSchemaValidateStream.patch | 29 +++++++++++++++++++
> patches/libxml2-2.9.10/series | 3 +-
> 2 files changed, 31 insertions(+), 1 deletion(-)
> create mode 100644 patches/libxml2-2.9.10/0002-Fix-memory-leak-in-xmlSchemaValidateStream.patch
>
> diff --git a/patches/libxml2-2.9.10/0002-Fix-memory-leak-in-xmlSchemaValidateStream.patch b/patches/libxml2-2.9.10/0002-Fix-memory-leak-in-xmlSchemaValidateStream.patch
> new file mode 100644
> index 000000000..1ca086217
> --- /dev/null
> +++ b/patches/libxml2-2.9.10/0002-Fix-memory-leak-in-xmlSchemaValidateStream.patch
> @@ -0,0 +1,29 @@
> +From: Zhipeng Xie <xiezhipeng1@huawei.com>
> +Date: Tue, 20 Aug 2019 16:33:06 +0800
> +Subject: [PATCH] Fix memory leak in xmlSchemaValidateStream
> +
> +When ctxt->schema is NULL, xmlSchemaSAXPlug->xmlSchemaPreRun
> +alloc a new schema for ctxt->schema and set vctxt->xsiAssemble
> +to 1. Then xmlSchemaVStart->xmlSchemaPreRun initialize
> +vctxt->xsiAssemble to 0 again which cause the alloced schema
> +can not be freed anymore.
> +
> +Found with libFuzzer.
> +
> +Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
> +---
> + xmlschemas.c | 1 -
> + 1 file changed, 1 deletion(-)
> +
> +diff --git a/xmlschemas.c b/xmlschemas.c
> +index d19de6df5f50..59495c2738ab 100644
> +--- a/xmlschemas.c
> ++++ b/xmlschemas.c
> +@@ -28095,7 +28095,6 @@ xmlSchemaPreRun(xmlSchemaValidCtxtPtr vctxt) {
> + vctxt->nberrors = 0;
> + vctxt->depth = -1;
> + vctxt->skipDepth = -1;
> +- vctxt->xsiAssemble = 0;
> + vctxt->hasKeyrefs = 0;
> + #ifdef ENABLE_IDC_NODE_TABLES_TEST
> + vctxt->createIDCNodeTables = 1;
> diff --git a/patches/libxml2-2.9.10/series b/patches/libxml2-2.9.10/series
> index b8e92fb7a..fed72960d 100644
> --- a/patches/libxml2-2.9.10/series
> +++ b/patches/libxml2-2.9.10/series
> @@ -2,6 +2,7 @@
> #tag:base --start-number 1
> #tag:upstream --start-number 1
> 0001-Fix-infinite-loop-in-xmlStringLenDecodeEntities.patch
> +0002-Fix-memory-leak-in-xmlSchemaValidateStream.patch
> #tag:ptx --start-number 200
> 0200-xml2-config-is-not-SYSROOT-aware.patch
> -# 0a9081f5db07b8cbb593bc669a7603c7 - git-ptx-patches magic
> +# d6f49636e8813a3a9e46758f352fc667 - git-ptx-patches magic
>
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
prev parent reply other threads:[~2020-03-27 9:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-18 13:27 [ptxdist] [PATCH 0/4] libxml2: Upgrade and add some fixes Alexander Dahl
2020-03-18 13:27 ` [ptxdist] [PATCH 1/4] libxml2: Fix license and add license file hashes Alexander Dahl
2020-03-27 9:52 ` [ptxdist] [1/4] " Michael Olbrich
2020-03-18 13:27 ` [ptxdist] [PATCH 2/4] libxml2: version bump 2.9.9 -> 2.9.10 Alexander Dahl
2020-03-27 9:52 ` [ptxdist] [2/4] " Michael Olbrich
2020-03-18 13:27 ` [ptxdist] [PATCH 3/4] libxml2: Add upstream patch fixing CVE-2020-7595 Alexander Dahl
2020-03-27 9:52 ` [ptxdist] [3/4] " Michael Olbrich
2020-03-18 13:27 ` [ptxdist] [PATCH 4/4] libxml2: Add upstream patch fixing CVE-2019-20388 Alexander Dahl
2020-03-27 9:52 ` Michael Olbrich [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1jHlf8-0000Fe-8x@dude02.lab.pengutronix.de \
--to=mol@pengutronix.de \
--cc=ada@thorsis.com \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox