From: "Devansh Patel -X (devanshp - E INFOCHIPS PRIVATE LIMITED at Cisco)" <devanshp@cisco.com>
To: openembedded-core@lists.openembedded.org
Cc: xe-linux-external@cisco.com, Devansh Patel <devanshp@cisco.com>
Subject: [OE-core][scarthgap][PATCH] libxml2: Fix CVE-2026-11979
Date: Mon, 20 Jul 2026 11:42:52 -0700 [thread overview]
Message-ID: <20260720184252.4060675-1-devanshp@cisco.com> (raw)
From: Devansh Patel <devanshp@cisco.com>
This patch applies the upstream fix as referenced in [2],
using the commit shown in [1].
[1] https://gitlab.gnome.org/GNOME/libxml2/-/commit/c2e233fc1b341685fc99621b2768b503f777a72e
[2] https://nvd.nist.gov/vuln/detail/CVE-2026-11979
Signed-off-by: Devansh Patel <devanshp@cisco.com>
---
.../libxml/libxml2/CVE-2026-11979.patch | 70 +++++++++++++++++++
meta/recipes-core/libxml/libxml2_2.12.10.bb | 1 +
2 files changed, 71 insertions(+)
create mode 100644 meta/recipes-core/libxml/libxml2/CVE-2026-11979.patch
diff --git a/meta/recipes-core/libxml/libxml2/CVE-2026-11979.patch b/meta/recipes-core/libxml/libxml2/CVE-2026-11979.patch
new file mode 100644
index 0000000000..427026b345
--- /dev/null
+++ b/meta/recipes-core/libxml/libxml2/CVE-2026-11979.patch
@@ -0,0 +1,70 @@
+From d8566dd918c612078dfb3ee1a95d7bb6f0656bfe Mon Sep 17 00:00:00 2001
+From: Daniel Garcia Moreno <daniel.garcia@suse.com>
+Date: Fri, 22 May 2026 12:21:20 +0200
+Subject: [PATCH] xmlcatalog: overflow check for large --shell commands
+
+Fix https://gitlab.gnome.org/GNOME/libxml2/-/work_items/1124
+
+CVE: CVE-2026-11979
+Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxml2/-/commit/c2e233fc1b341685fc99621b2768b503f777a72e]
+
+Backport Changes:
+- The commit modifies test/catalogs/test.sh.
+- test/catalogs/test.sh does not exist in the libxml2 v2.12.10
+ source used in Scarthgap and was introduced later version
+ libxml2 v2.14.0 [1].
+- The test changes were omitted; only the required fix in
+ xmlcatalog.c was backported.
+
+[1] https://gitlab.gnome.org/GNOME/libxml2/-/commit/f06fc933cdaea2ce8e9cea275fdbf4edb85f9837
+
+(cherry picked from commit c2e233fc1b341685fc99621b2768b503f777a72e)
+Signed-off-by: Devansh Patel <devanshp@cisco.com>
+---
+ xmlcatalog.c | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git a/xmlcatalog.c b/xmlcatalog.c
+index 588802b41..51569b879 100644
+--- a/xmlcatalog.c
++++ b/xmlcatalog.c
+@@ -114,6 +114,12 @@ static void usershell(void) {
+ (*cur != '\n') && (*cur != '\r')) {
+ if (*cur == 0)
+ break;
++ /* Do not read beyond the command array capacity */
++ if (i >= (int)sizeof(command) - 2) {
++ printf("Invalid command %s\n", cur);
++ i = 0;
++ break;
++ }
+ command[i++] = *cur++;
+ }
+ command[i] = 0;
+@@ -131,6 +137,11 @@ static void usershell(void) {
+ while ((*cur != '\n') && (*cur != '\r') && (*cur != 0)) {
+ if (*cur == 0)
+ break;
++ if (i >= (int)sizeof(arg) - 2) {
++ printf("Invalid arg %s\n", arg);
++ i = 0;
++ break;
++ }
+ arg[i++] = *cur++;
+ }
+ arg[i] = 0;
+@@ -143,6 +154,11 @@ static void usershell(void) {
+ cur = arg;
+ memset(argv, 0, sizeof(argv));
+ while (*cur != 0) {
++ if (i >= (int)sizeof(argv) / (int)sizeof(char*)) {
++ printf("Too much arguments\n");
++ break;
++ }
++
+ while ((*cur == ' ') || (*cur == '\t')) cur++;
+ if (*cur == '\'') {
+ cur++;
+--
+2.35.6
+
diff --git a/meta/recipes-core/libxml/libxml2_2.12.10.bb b/meta/recipes-core/libxml/libxml2_2.12.10.bb
index 2bfa78324f..d476ba14b6 100644
--- a/meta/recipes-core/libxml/libxml2_2.12.10.bb
+++ b/meta/recipes-core/libxml/libxml2_2.12.10.bb
@@ -31,6 +31,7 @@ SRC_URI += "http://www.w3.org/XML/Test/xmlts20130923.tar;subdir=${BP};name=testt
file://CVE-2026-0992-02.patch \
file://CVE-2026-0992-03.patch \
file://CVE-2026-1757.patch \
+ file://CVE-2026-11979.patch \
"
SRC_URI[archive.sha256sum] = "c3d8c0c34aa39098f66576fe51969db12a5100b956233dc56506f7a8679be995"
--
2.44.4
reply other threads:[~2026-07-20 18:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260720184252.4060675-1-devanshp@cisco.com \
--to=devanshp@cisco.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=xe-linux-external@cisco.com \
/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