diff options
| author | Divya Chellam <divya.chellam@windriver.com> | 2025-07-16 16:48:49 +0530 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2025-07-21 09:18:00 -0700 |
| commit | e63738d6b1542888e4c0bc1a9302ba11c4f873f5 (patch) | |
| tree | 745a9e718b1e8e4eb462ee42d03a5fe92ba50c54 /meta/recipes-core/libxml | |
| parent | 4a37001c6a4fcdfb6b8fb5627f555e6b9b8c010a (diff) | |
| download | poky-e63738d6b1542888e4c0bc1a9302ba11c4f873f5.tar.gz | |
libxml2: fix CVE-2025-49795
A NULL pointer dereference vulnerability was found in libxml2 when
processing XPath XML expressions. This flaw allows an attacker to
craft a malicious XML input to libxml2, leading to a denial of service.
Pick commit from 2.13 branch
Reference:
https://security-tracker.debian.org/tracker/CVE-2025-49795
Upstream-patch:
https://gitlab.gnome.org/GNOME/libxml2/-/commit/62048278a4c5fdf14d287dfb400005c0a0caa69f
(From OE-Core rev: 9f17e0911eeb49e007de8ee3e50d9f3f38e08a26)
Signed-off-by: Divya Chellam <divya.chellam@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/recipes-core/libxml')
| -rw-r--r-- | meta/recipes-core/libxml/libxml2/CVE-2025-49795.patch | 75 | ||||
| -rw-r--r-- | meta/recipes-core/libxml/libxml2_2.13.8.bb | 1 |
2 files changed, 76 insertions, 0 deletions
diff --git a/meta/recipes-core/libxml/libxml2/CVE-2025-49795.patch b/meta/recipes-core/libxml/libxml2/CVE-2025-49795.patch new file mode 100644 index 0000000000..11f543cb9b --- /dev/null +++ b/meta/recipes-core/libxml/libxml2/CVE-2025-49795.patch | |||
| @@ -0,0 +1,75 @@ | |||
| 1 | From 62048278a4c5fdf14d287dfb400005c0a0caa69f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Michael Mann <mmann78@netscape.net> | ||
| 3 | Date: Sat, 21 Jun 2025 12:11:30 -0400 | ||
| 4 | Subject: [PATCH] [CVE-2025-49795] schematron: Fix null pointer dereference | ||
| 5 | leading to DoS | ||
| 6 | |||
| 7 | Fixes #932 | ||
| 8 | |||
| 9 | CVE: CVE-2025-49795 | ||
| 10 | |||
| 11 | Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/62048278a4c5fdf14d287dfb400005c0a0caa69f] | ||
| 12 | |||
| 13 | Signed-off-by: Divya Chellam <divya.chellam@windriver.com> | ||
| 14 | --- | ||
| 15 | result/schematron/zvon16_0.err | 3 +++ | ||
| 16 | schematron.c | 5 +++++ | ||
| 17 | test/schematron/zvon16.sct | 7 +++++++ | ||
| 18 | test/schematron/zvon16_0.xml | 5 +++++ | ||
| 19 | 4 files changed, 20 insertions(+) | ||
| 20 | create mode 100644 result/schematron/zvon16_0.err | ||
| 21 | create mode 100644 test/schematron/zvon16.sct | ||
| 22 | create mode 100644 test/schematron/zvon16_0.xml | ||
| 23 | |||
| 24 | diff --git a/result/schematron/zvon16_0.err b/result/schematron/zvon16_0.err | ||
| 25 | new file mode 100644 | ||
| 26 | index 0000000..3d05240 | ||
| 27 | --- /dev/null | ||
| 28 | +++ b/result/schematron/zvon16_0.err | ||
| 29 | @@ -0,0 +1,3 @@ | ||
| 30 | +XPath error : Unregistered function | ||
| 31 | +./test/schematron/zvon16_0.xml:2: element book: schematron error : /library/book line 2: Book | ||
| 32 | +./test/schematron/zvon16_0.xml fails to validate | ||
| 33 | diff --git a/schematron.c b/schematron.c | ||
| 34 | index 426300c..6e2ceeb 100644 | ||
| 35 | --- a/schematron.c | ||
| 36 | +++ b/schematron.c | ||
| 37 | @@ -1509,6 +1509,11 @@ xmlSchematronFormatReport(xmlSchematronValidCtxtPtr ctxt, | ||
| 38 | select = xmlGetNoNsProp(child, BAD_CAST "select"); | ||
| 39 | comp = xmlXPathCtxtCompile(ctxt->xctxt, select); | ||
| 40 | eval = xmlXPathCompiledEval(comp, ctxt->xctxt); | ||
| 41 | + if (eval == NULL) { | ||
| 42 | + xmlXPathFreeCompExpr(comp); | ||
| 43 | + xmlFree(select); | ||
| 44 | + return ret; | ||
| 45 | + } | ||
| 46 | |||
| 47 | switch (eval->type) { | ||
| 48 | case XPATH_NODESET: { | ||
| 49 | diff --git a/test/schematron/zvon16.sct b/test/schematron/zvon16.sct | ||
| 50 | new file mode 100644 | ||
| 51 | index 0000000..f03848a | ||
| 52 | --- /dev/null | ||
| 53 | +++ b/test/schematron/zvon16.sct | ||
| 54 | @@ -0,0 +1,7 @@ | ||
| 55 | +<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron"> | ||
| 56 | + <sch:pattern id="TestPattern"> | ||
| 57 | + <sch:rule context="book"> | ||
| 58 | + <sch:report test="not(@available)">Book <sch:value-of select="falae()"/> test</sch:report> | ||
| 59 | + </sch:rule> | ||
| 60 | + </sch:pattern> | ||
| 61 | +</sch:schema> | ||
| 62 | diff --git a/test/schematron/zvon16_0.xml b/test/schematron/zvon16_0.xml | ||
| 63 | new file mode 100644 | ||
| 64 | index 0000000..551e2d6 | ||
| 65 | --- /dev/null | ||
| 66 | +++ b/test/schematron/zvon16_0.xml | ||
| 67 | @@ -0,0 +1,5 @@ | ||
| 68 | +<library> | ||
| 69 | + <book title="Test Book" id="bk101"> | ||
| 70 | + <author>Test Author</author> | ||
| 71 | + </book> | ||
| 72 | +</library> | ||
| 73 | -- | ||
| 74 | 2.40.0 | ||
| 75 | |||
diff --git a/meta/recipes-core/libxml/libxml2_2.13.8.bb b/meta/recipes-core/libxml/libxml2_2.13.8.bb index 3d6ecf5458..fd042c311d 100644 --- a/meta/recipes-core/libxml/libxml2_2.13.8.bb +++ b/meta/recipes-core/libxml/libxml2_2.13.8.bb | |||
| @@ -19,6 +19,7 @@ SRC_URI += "http://www.w3.org/XML/Test/xmlts20130923.tar;subdir=${BP};name=testt | |||
| 19 | file://install-tests.patch \ | 19 | file://install-tests.patch \ |
| 20 | file://CVE-2025-6021.patch \ | 20 | file://CVE-2025-6021.patch \ |
| 21 | file://CVE-2025-49794_CVE-2025-49796.patch \ | 21 | file://CVE-2025-49794_CVE-2025-49796.patch \ |
| 22 | file://CVE-2025-49795.patch \ | ||
| 22 | " | 23 | " |
| 23 | 24 | ||
| 24 | SRC_URI[archive.sha256sum] = "277294cb33119ab71b2bc81f2f445e9bc9435b893ad15bb2cd2b0e859a0ee84a" | 25 | SRC_URI[archive.sha256sum] = "277294cb33119ab71b2bc81f2f445e9bc9435b893ad15bb2cd2b0e859a0ee84a" |
