Browse Source

chore: cherry-pick 1 change from Release-1-M122 (#41488)

Pedro Pontes 1 year ago
parent
commit
7b2c526a43

+ 1 - 0
patches/chromium/.patches

@@ -158,3 +158,4 @@ fix_racy_iterator_use_in_node_addconnection.patch
 fix_a_crash_when_a_bmp_image_contains_an_unnecessary_eof_code.patch
 m120_ipcz_fix_a_few_weak_asserts.patch
 prevent_mojotrap_event_re-ordering.patch
+m122_cherry_pick_cve-2024-25062_libxml_fix.patch

+ 41 - 0
patches/chromium/m122_cherry_pick_cve-2024-25062_libxml_fix.patch

@@ -0,0 +1,41 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Joey Arhar <[email protected]>
+Date: Wed, 21 Feb 2024 21:06:46 +0000
+Subject: M122: cherry pick CVE-2024-25062 libxml fix
+
+This patch cherry picks the CVE-2024-25062 fix from libxml:
+https://gitlab.gnome.org/GNOME/libxml2/-/commit/1a66b176055d25ee635bf328c7b35b381db0b71d
+
+Bug: 325094430
+Change-Id: I526ee718269ed8700b90885630b67f00f2f95089
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5310037
+Auto-Submit: Joey Arhar <[email protected]>
+Commit-Queue: David Baron <[email protected]>
+Reviewed-by: David Baron <[email protected]>
+Commit-Queue: Joey Arhar <[email protected]>
+Cr-Commit-Position: refs/branch-heads/6261@{#913}
+Cr-Branched-From: 9755d9d81e4a8cb5b4f76b23b761457479dbb06b-refs/heads/main@{#1250580}
+
+diff --git a/third_party/libxml/README.chromium b/third_party/libxml/README.chromium
+index f3e311972eb41e768c905a451ef576706434eeec..17ffbdf2734a788ffbaab9df50fda68b56e91c53 100644
+--- a/third_party/libxml/README.chromium
++++ b/third_party/libxml/README.chromium
+@@ -36,5 +36,6 @@ Modifications:
+   - LIBXML_XINCLUDE_ENABLED
+   - LIBXML_XPTR_ENABLED
+   - LIBXML_ZLIB_ENABLED
++- Cherry picked fix for CVE-2024-25062
+ 
+ This import was generated by the chromium/roll.py script.
+diff --git a/third_party/libxml/src/xmlreader.c b/third_party/libxml/src/xmlreader.c
+index 71f2f933cc3b5a1064637036aed09459f2d1ce89..82cc186ea829ea60582ea0f7056125bc3ff310f3 100644
+--- a/third_party/libxml/src/xmlreader.c
++++ b/third_party/libxml/src/xmlreader.c
+@@ -1445,6 +1445,7 @@ node_found:
+      * Handle XInclude if asked for
+      */
+     if ((reader->xinclude) && (reader->in_xinclude == 0) &&
++        (reader->state != XML_TEXTREADER_BACKTRACK) &&
+         (reader->node != NULL) &&
+ 	(reader->node->type == XML_ELEMENT_NODE) &&
+ 	(reader->node->ns != NULL) &&