From: Siddharth <sdoshi@mvista.com>
To: openembedded-core@lists.openembedded.org
Cc: Siddharth Doshi <sdoshi@mvista.com>
Subject: [OE-core][scarthgap][PATCH 4/6] libxml2: Security Fix for CVE-2026-86140
Date: Fri, 11 Sep 2026 01:33:27 +0530 [thread overview]
Message-ID: <20260910200329.842463-4-sdoshi@mvista.com> (raw)
In-Reply-To: <20260910200329.842463-1-sdoshi@mvista.com>
From: Siddharth Doshi <sdoshi@mvista.com>
Picking patch as per [1], and same patch is mentioned in [2]
References:
[1] https://nvd.nist.gov/vuln/detail/CVE-2026-86140
[2] https://security-tracker.debian.org/tracker/CVE-2026-86140
Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
---
.../libxml/libxml2/CVE-2026-86140.patch | 57 +++++++++++++++++++
meta/recipes-core/libxml/libxml2_2.12.10.bb | 1 +
2 files changed, 58 insertions(+)
create mode 100644 meta/recipes-core/libxml/libxml2/CVE-2026-86140.patch
diff --git a/meta/recipes-core/libxml/libxml2/CVE-2026-86140.patch b/meta/recipes-core/libxml/libxml2/CVE-2026-86140.patch
new file mode 100644
index 0000000000..c7b6ace560
--- /dev/null
+++ b/meta/recipes-core/libxml/libxml2/CVE-2026-86140.patch
@@ -0,0 +1,57 @@
+From 9a21b9dbb096f9e612f37ba72df6a2fb6a60c60c Mon Sep 17 00:00:00 2001
+From: mohammadmseet-hue <mohammadmseet@gmail.com>
+Date: Thu, 16 Apr 2026 02:54:37 +0200
+Subject: [PATCH 3/6] fix: add bounds checks to xmlSnprintfElements in valid.c
+
+CVE-2025-24928 fixed xmlSnprintfElementContent for unchecked strcat()
+writes, but the sibling function xmlSnprintfElements has the identical
+unfixed pattern. The strcat(buf, "(") before the while loop and
+strcat(buf, ")") after the loop exit have no bounds checks.
+
+Add remaining-space checks before both strcat calls, with early return
+and ellipsis when space is insufficient.
+
+Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/d1686f91dbda141a752200419d35639fd6b38340]
+CVE: CVE-2026-86140
+Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
+---
+ valid.c | 16 ++++++++++++++--
+ 1 file changed, 14 insertions(+), 2 deletions(-)
+
+diff --git a/valid.c b/valid.c
+index ae4bb82..718e6d8 100644
+--- a/valid.c
++++ b/valid.c
+@@ -5047,7 +5047,15 @@ xmlSnprintfElements(char *buf, int size, xmlNodePtr node, int glob) {
+ int len;
+
+ if (node == NULL) return;
+- if (glob) strcat(buf, "(");
++ len = strlen(buf);
++ if (glob) {
++ if (size - len < 50) {
++ if ((size - len > 4) && (buf[len - 1] != '.'))
++ strcat(buf, " ...");
++ return;
++ }
++ strcat(buf, "(");
++ }
+ cur = node;
+ while (cur != NULL) {
+ len = strlen(buf);
+@@ -5111,7 +5119,11 @@ xmlSnprintfElements(char *buf, int size, xmlNodePtr node, int glob) {
+ }
+ cur = cur->next;
+ }
+- if (glob) strcat(buf, ")");
++ if (glob) {
++ len = strlen(buf);
++ if (size - len > 1)
++ strcat(buf, ")");
++ }
+ }
+
+ /**
+--
+2.34.1
+
diff --git a/meta/recipes-core/libxml/libxml2_2.12.10.bb b/meta/recipes-core/libxml/libxml2_2.12.10.bb
index 581f38197f..b3f6a482d2 100644
--- a/meta/recipes-core/libxml/libxml2_2.12.10.bb
+++ b/meta/recipes-core/libxml/libxml2_2.12.10.bb
@@ -34,6 +34,7 @@ SRC_URI += "http://www.w3.org/XML/Test/xmlts20130923.tar;subdir=${BP};name=testt
file://CVE-2026-11979.patch \
file://CVE-2026-86137.patch \
file://CVE-2026-86138.patch \
+ file://CVE-2026-86140.patch \
"
SRC_URI[archive.sha256sum] = "c3d8c0c34aa39098f66576fe51969db12a5100b956233dc56506f7a8679be995"
--
2.34.1
next prev parent reply other threads:[~2026-09-10 20:05 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 20:03 [OE-core][scarthgap][PATCH 1/6] libxml2: Security Fix for CVE-2026-86137 Siddharth
2026-09-10 20:03 ` [OE-core][scarthgap][PATCH 2/6] libxml2: Security Fix for CVE-2026-86138 Siddharth
2026-09-10 20:03 ` [OE-core][scarthgap][PATCH 3/6] libxml2: set CVE_STATUS for CVE-2026-86139 Siddharth
2026-09-10 20:03 ` Siddharth [this message]
2026-09-10 20:03 ` [OE-core][scarthgap][PATCH 5/6] libxml2: Security Fix for CVE-2026-86141 Siddharth
2026-09-25 1:34 ` Triet Hoang
2026-09-10 20:03 ` [OE-core][scarthgap][PATCH 6/6] libxml2: Security Fix for CVE-2026-86143 Siddharth
2026-09-11 13:05 ` [OE-core][scarthgap][PATCH 1/6] libxml2: Security Fix for CVE-2026-86137 Yoann Congal
2026-09-11 13:24 ` [scarthgap][PATCH " Siddharth Doshi
2026-09-11 14:29 ` [OE-core] " Yoann Congal
2026-09-11 19:04 ` Siddharth Doshi
2026-09-21 12:38 ` [OE-core][scarthgap][PATCH " Yoann Congal
2026-09-21 15:00 ` Yoann Congal
2026-10-02 10:59 ` Yoann Congal
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=20260910200329.842463-4-sdoshi@mvista.com \
--to=sdoshi@mvista.com \
--cc=openembedded-core@lists.openembedded.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.