* [blacksail][PATCH 0/2] expat: fix High scored CVEs
@ 2026-11-18 10:30 João Marcos Costa (Schneider Electric)
2026-11-18 10:30 ` [blacksail][PATCH 1/2] expat: fix CVE-2026-118370 João Marcos Costa (Schneider Electric)
2026-11-18 10:30 ` [blacksail][PATCH 2/2] expat: fix CVE-2026-117610 João Marcos Costa (Schneider Electric)
0 siblings, 2 replies; 5+ messages in thread
From: João Marcos Costa (Schneider Electric) @ 2026-11-18 10:30 UTC (permalink / raw)
To: openembedded-core
Cc: thomas.petazzoni, yoann.congal, bastien.jauny,
João Marcos Costa (Schneider Electric)
Hello,
I previously sent these backports to scarthgap, in two separate mails,
and now I am sending them once again but for blacksail, in a single patch
series.
I tested them with the current latest revision of blacksail ("5b458838c12"), building for qemuarm64.
Best regards,
João Marcos Costa (Schneider Electric) (2):
expat: fix CVE-2026-118370
expat: fix CVE-2026-117610
.../expat/expat/CVE-2026-117610.patch | 30 ++++++++++
.../expat/expat/CVE-2026-118370-01.patch | 58 +++++++++++++++++++
.../expat/expat/CVE-2026-118370-02.patch | 29 ++++++++++
meta/recipes-core/expat/expat_2.8.5.bb | 3 +
4 files changed, 120 insertions(+)
create mode 100644 meta/recipes-core/expat/expat/CVE-2026-117610.patch
create mode 100644 meta/recipes-core/expat/expat/CVE-2026-118370-01.patch
create mode 100644 meta/recipes-core/expat/expat/CVE-2026-118370-02.patch
--
2.55.0
^ permalink raw reply [flat|nested] 5+ messages in thread* [blacksail][PATCH 1/2] expat: fix CVE-2026-118370 2026-11-18 10:30 [blacksail][PATCH 0/2] expat: fix High scored CVEs João Marcos Costa (Schneider Electric) @ 2026-11-18 10:30 ` João Marcos Costa (Schneider Electric) 2026-11-23 11:33 ` Yoann Congal 2026-11-18 10:30 ` [blacksail][PATCH 2/2] expat: fix CVE-2026-117610 João Marcos Costa (Schneider Electric) 1 sibling, 1 reply; 5+ messages in thread From: João Marcos Costa (Schneider Electric) @ 2026-11-18 10:30 UTC (permalink / raw) To: openembedded-core Cc: thomas.petazzoni, yoann.congal, bastien.jauny, João Marcos Costa (Schneider Electric) This vulnerability, marked as High [1], was fixed upstream [2] since 2.10.0. Backport the fix to expat v2.8.3. [1] https://nvd.nist.gov/vuln/detail/cve-2026-118370 [2] https://github.com/libexpat/libexpat/pull/1450 Signed-off-by: João Marcos Costa (Schneider Electric) <joaomarcos.costa@bootlin.com> --- .../expat/expat/CVE-2026-118370-01.patch | 58 +++++++++++++++++++ .../expat/expat/CVE-2026-118370-02.patch | 29 ++++++++++ meta/recipes-core/expat/expat_2.8.5.bb | 2 + 3 files changed, 89 insertions(+) create mode 100644 meta/recipes-core/expat/expat/CVE-2026-118370-01.patch create mode 100644 meta/recipes-core/expat/expat/CVE-2026-118370-02.patch diff --git a/meta/recipes-core/expat/expat/CVE-2026-118370-01.patch b/meta/recipes-core/expat/expat/CVE-2026-118370-01.patch new file mode 100644 index 0000000000..aa4fe2df28 --- /dev/null +++ b/meta/recipes-core/expat/expat/CVE-2026-118370-01.patch @@ -0,0 +1,58 @@ +From a135244f77776c56d825cd81efd8f98abe014841 Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping <sebastian@pipping.org> +Date: Tue, 27 Oct 2026 15:20:33 +0100 +Subject: [PATCH] lib: Protect `attIndex` in `storeAtts` from signed integer + overflow + +.. by migrating to `size_t` + +CVE: CVE-2026-118370 +Upstream-Status: Backport [https://github.com/libexpat/libexpat/pull/1450] + +Signed-off-by: João Marcos Costa <joaomarcos.costa@bootlin.com> +--- + lib/xmlparse.c | 15 ++++++++++----- + 1 file changed, 10 insertions(+), 5 deletions(-) + +diff --git a/lib/xmlparse.c b/lib/xmlparse.c +index cb8839be..dadf647a 100644 +--- a/lib/xmlparse.c ++++ b/lib/xmlparse.c +@@ -3858,7 +3858,7 @@ storeAtts(XML_Parser parser, const ENCODING *enc, const char *attStr, + TAG_NAME *tagNamePtr, BINDING **bindingsPtr, + enum XML_Account account) { + DTD *const dtd = parser->m_dtd; /* save one level of indirection */ +- int attIndex = 0; ++ size_t attIndex = 0; + XML_Char *uri; + int nPrefixes = 0; + BINDING *binding; +@@ -4037,11 +4037,16 @@ storeAtts(XML_Parser parser, const ENCODING *enc, const char *attStr, + } + + /* set-up for XML_GetSpecifiedAttributeCount and XML_GetIdAttributeIndex */ +- parser->m_nSpecifiedAtts = attIndex; ++ // Detect and reject integer overflow ++ if (attIndex > INT_MAX) ++ return XML_ERROR_NO_MEMORY; ++ parser->m_nSpecifiedAtts = (int)attIndex; + if (elementType->idAtt && (elementType->idAtt->name)[-1]) { +- for (int i = 0; i < attIndex; i += 2) ++ for (size_t i = 0; i < attIndex; i += 2) + if (appAtts[i] == elementType->idAtt->name) { +- parser->m_idAttIndex = i; ++ if (i > INT_MAX) ++ return XML_ERROR_NO_MEMORY; ++ parser->m_idAttIndex = (int)i; + break; + } + } else +@@ -4074,7 +4079,7 @@ storeAtts(XML_Parser parser, const ENCODING *enc, const char *attStr, + + /* expand prefixed attribute names, check for duplicates, + and clear flags that say whether attributes were specified */ +- int i = 0; ++ size_t i = 0; + if (nPrefixes) { + unsigned int j; /* hash table index */ + unsigned long version = parser->m_nsAttsVersion; diff --git a/meta/recipes-core/expat/expat/CVE-2026-118370-02.patch b/meta/recipes-core/expat/expat/CVE-2026-118370-02.patch new file mode 100644 index 0000000000..1d8d1d4907 --- /dev/null +++ b/meta/recipes-core/expat/expat/CVE-2026-118370-02.patch @@ -0,0 +1,29 @@ +From d39404514bc51901b1e673b88bf5ec5bc6bf657a Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping <sebastian@pipping.org> +Date: Tue, 27 Oct 2026 17:57:19 +0100 +Subject: [PATCH] lib: Protect `nPrefixes` in `storeAtts` from signed integer + overflow + +.. by migrating to `size_t` + +CVE: CVE-2026-118370 +Upstream-Status: Backport [https://github.com/libexpat/libexpat/pull/1450] + +Signed-off-by: João Marcos Costa <joaomarcos.costa@bootlin.com> +--- + lib/xmlparse.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/xmlparse.c b/lib/xmlparse.c +index dadf647a..e248043e 100644 +--- a/lib/xmlparse.c ++++ b/lib/xmlparse.c +@@ -3860,7 +3860,7 @@ storeAtts(XML_Parser parser, const ENCODING *enc, const char *attStr, + DTD *const dtd = parser->m_dtd; /* save one level of indirection */ + size_t attIndex = 0; + XML_Char *uri; +- int nPrefixes = 0; ++ size_t nPrefixes = 0; + BINDING *binding; + const XML_Char *localPart; + diff --git a/meta/recipes-core/expat/expat_2.8.5.bb b/meta/recipes-core/expat/expat_2.8.5.bb index 125d0e1f82..cca713d95f 100644 --- a/meta/recipes-core/expat/expat_2.8.5.bb +++ b/meta/recipes-core/expat/expat_2.8.5.bb @@ -12,6 +12,8 @@ SRC_URI = "${GITHUB_BASE_URI}/download/R_${VERSION_TAG}/expat-${PV}.tar.bz2 \ file://run-ptest \ file://CVE-2026-102633.patch \ file://CVE-2026-77214.patch \ + file://CVE-2026-118370-01.patch \ + file://CVE-2026-118370-02.patch \ " GITHUB_BASE_URI = "https://github.com/libexpat/libexpat/releases/" -- 2.55.0 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [blacksail][PATCH 1/2] expat: fix CVE-2026-118370 2026-11-18 10:30 ` [blacksail][PATCH 1/2] expat: fix CVE-2026-118370 João Marcos Costa (Schneider Electric) @ 2026-11-23 11:33 ` Yoann Congal 2026-11-23 12:56 ` Joao Marcos Costa 0 siblings, 1 reply; 5+ messages in thread From: Yoann Congal @ 2026-11-23 11:33 UTC (permalink / raw) To: João Marcos Costa (Schneider Electric), openembedded-core Cc: thomas.petazzoni, bastien.jauny On Wed Nov 18, 2026 at 11:30 AM CET, João Marcos Costa (Schneider Electric) wrote: > This vulnerability, marked as High [1], was fixed upstream [2] since > 2.10.0. > > Backport the fix to expat v2.8.3. > > [1] https://nvd.nist.gov/vuln/detail/cve-2026-118370 > [2] https://github.com/libexpat/libexpat/pull/1450 > > Signed-off-by: João Marcos Costa (Schneider Electric) <joaomarcos.costa@bootlin.com> > --- > .../expat/expat/CVE-2026-118370-01.patch | 58 +++++++++++++++++++ > .../expat/expat/CVE-2026-118370-02.patch | 29 ++++++++++ > meta/recipes-core/expat/expat_2.8.5.bb | 2 + > 3 files changed, 89 insertions(+) > create mode 100644 meta/recipes-core/expat/expat/CVE-2026-118370-01.patch > create mode 100644 meta/recipes-core/expat/expat/CVE-2026-118370-02.patch > > diff --git a/meta/recipes-core/expat/expat/CVE-2026-118370-01.patch b/meta/recipes-core/expat/expat/CVE-2026-118370-01.patch > new file mode 100644 > index 0000000000..aa4fe2df28 > --- /dev/null > +++ b/meta/recipes-core/expat/expat/CVE-2026-118370-01.patch > @@ -0,0 +1,58 @@ > +From a135244f77776c56d825cd81efd8f98abe014841 Mon Sep 17 00:00:00 2001 > +From: Sebastian Pipping <sebastian@pipping.org> > +Date: Tue, 27 Oct 2026 15:20:33 +0100 > +Subject: [PATCH] lib: Protect `attIndex` in `storeAtts` from signed integer > + overflow > + > +.. by migrating to `size_t` > + > +CVE: CVE-2026-118370 > +Upstream-Status: Backport [https://github.com/libexpat/libexpat/pull/1450] Hello, I'll take this patch for now but, please, in the future: Either import the whole pull request as one patch or reference the commits in Upstream-Status: Backport. For example, this one is https://github.com/libexpat/libexpat/commit/1bac53c4fc460a03cd9860f39501c7979f6750ae. Thanks! > + > +Signed-off-by: João Marcos Costa <joaomarcos.costa@bootlin.com> > +--- > + lib/xmlparse.c | 15 ++++++++++----- > + 1 file changed, 10 insertions(+), 5 deletions(-) > + > +diff --git a/lib/xmlparse.c b/lib/xmlparse.c > +index cb8839be..dadf647a 100644 > +--- a/lib/xmlparse.c > ++++ b/lib/xmlparse.c > +@@ -3858,7 +3858,7 @@ storeAtts(XML_Parser parser, const ENCODING *enc, const char *attStr, > + TAG_NAME *tagNamePtr, BINDING **bindingsPtr, > + enum XML_Account account) { > + DTD *const dtd = parser->m_dtd; /* save one level of indirection */ > +- int attIndex = 0; > ++ size_t attIndex = 0; > + XML_Char *uri; > + int nPrefixes = 0; > + BINDING *binding; > +@@ -4037,11 +4037,16 @@ storeAtts(XML_Parser parser, const ENCODING *enc, const char *attStr, > + } > + > + /* set-up for XML_GetSpecifiedAttributeCount and XML_GetIdAttributeIndex */ > +- parser->m_nSpecifiedAtts = attIndex; > ++ // Detect and reject integer overflow > ++ if (attIndex > INT_MAX) > ++ return XML_ERROR_NO_MEMORY; > ++ parser->m_nSpecifiedAtts = (int)attIndex; > + if (elementType->idAtt && (elementType->idAtt->name)[-1]) { > +- for (int i = 0; i < attIndex; i += 2) > ++ for (size_t i = 0; i < attIndex; i += 2) > + if (appAtts[i] == elementType->idAtt->name) { > +- parser->m_idAttIndex = i; > ++ if (i > INT_MAX) > ++ return XML_ERROR_NO_MEMORY; > ++ parser->m_idAttIndex = (int)i; > + break; > + } > + } else > +@@ -4074,7 +4079,7 @@ storeAtts(XML_Parser parser, const ENCODING *enc, const char *attStr, > + > + /* expand prefixed attribute names, check for duplicates, > + and clear flags that say whether attributes were specified */ > +- int i = 0; > ++ size_t i = 0; > + if (nPrefixes) { > + unsigned int j; /* hash table index */ > + unsigned long version = parser->m_nsAttsVersion; > diff --git a/meta/recipes-core/expat/expat/CVE-2026-118370-02.patch b/meta/recipes-core/expat/expat/CVE-2026-118370-02.patch > new file mode 100644 > index 0000000000..1d8d1d4907 > --- /dev/null > +++ b/meta/recipes-core/expat/expat/CVE-2026-118370-02.patch > @@ -0,0 +1,29 @@ > +From d39404514bc51901b1e673b88bf5ec5bc6bf657a Mon Sep 17 00:00:00 2001 > +From: Sebastian Pipping <sebastian@pipping.org> > +Date: Tue, 27 Oct 2026 17:57:19 +0100 > +Subject: [PATCH] lib: Protect `nPrefixes` in `storeAtts` from signed integer > + overflow > + > +.. by migrating to `size_t` > + > +CVE: CVE-2026-118370 > +Upstream-Status: Backport [https://github.com/libexpat/libexpat/pull/1450] > + > +Signed-off-by: João Marcos Costa <joaomarcos.costa@bootlin.com> > +--- > + lib/xmlparse.c | 2 +- > + 1 file changed, 1 insertion(+), 1 deletion(-) > + > +diff --git a/lib/xmlparse.c b/lib/xmlparse.c > +index dadf647a..e248043e 100644 > +--- a/lib/xmlparse.c > ++++ b/lib/xmlparse.c > +@@ -3860,7 +3860,7 @@ storeAtts(XML_Parser parser, const ENCODING *enc, const char *attStr, > + DTD *const dtd = parser->m_dtd; /* save one level of indirection */ > + size_t attIndex = 0; > + XML_Char *uri; > +- int nPrefixes = 0; > ++ size_t nPrefixes = 0; > + BINDING *binding; > + const XML_Char *localPart; > + > diff --git a/meta/recipes-core/expat/expat_2.8.5.bb b/meta/recipes-core/expat/expat_2.8.5.bb > index 125d0e1f82..cca713d95f 100644 > --- a/meta/recipes-core/expat/expat_2.8.5.bb > +++ b/meta/recipes-core/expat/expat_2.8.5.bb > @@ -12,6 +12,8 @@ SRC_URI = "${GITHUB_BASE_URI}/download/R_${VERSION_TAG}/expat-${PV}.tar.bz2 \ > file://run-ptest \ > file://CVE-2026-102633.patch \ > file://CVE-2026-77214.patch \ > + file://CVE-2026-118370-01.patch \ > + file://CVE-2026-118370-02.patch \ > " > > GITHUB_BASE_URI = "https://github.com/libexpat/libexpat/releases/" -- Yoann Congal Smile ECS ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [blacksail][PATCH 1/2] expat: fix CVE-2026-118370 2026-11-23 11:33 ` Yoann Congal @ 2026-11-23 12:56 ` Joao Marcos Costa 0 siblings, 0 replies; 5+ messages in thread From: Joao Marcos Costa @ 2026-11-23 12:56 UTC (permalink / raw) To: Yoann Congal, openembedded-core; +Cc: thomas.petazzoni, bastien.jauny Hello, Yoan On 11/23/26 12:33 PM, Yoann Congal wrote: > On Wed Nov 18, 2026 at 11:30 AM CET, João Marcos Costa (Schneider Electric) wrote: >> This vulnerability, marked as High [1], was fixed upstream [2] since >> 2.10.0. >> >> Backport the fix to expat v2.8.3. >> >> [1] https://nvd.nist.gov/vuln/detail/cve-2026-118370 >> [2] https://github.com/libexpat/libexpat/pull/1450 >> >> Signed-off-by: João Marcos Costa (Schneider Electric) <joaomarcos.costa@bootlin.com> >> --- >> .../expat/expat/CVE-2026-118370-01.patch | 58 +++++++++++++++++++ >> .../expat/expat/CVE-2026-118370-02.patch | 29 ++++++++++ >> meta/recipes-core/expat/expat_2.8.5.bb | 2 + >> 3 files changed, 89 insertions(+) >> create mode 100644 meta/recipes-core/expat/expat/CVE-2026-118370-01.patch >> create mode 100644 meta/recipes-core/expat/expat/CVE-2026-118370-02.patch >> >> diff --git a/meta/recipes-core/expat/expat/CVE-2026-118370-01.patch b/meta/recipes-core/expat/expat/CVE-2026-118370-01.patch >> new file mode 100644 >> index 0000000000..aa4fe2df28 >> --- /dev/null >> +++ b/meta/recipes-core/expat/expat/CVE-2026-118370-01.patch >> @@ -0,0 +1,58 @@ >> +From a135244f77776c56d825cd81efd8f98abe014841 Mon Sep 17 00:00:00 2001 >> +From: Sebastian Pipping <sebastian@pipping.org> >> +Date: Tue, 27 Oct 2026 15:20:33 +0100 >> +Subject: [PATCH] lib: Protect `attIndex` in `storeAtts` from signed integer >> + overflow >> + >> +.. by migrating to `size_t` >> + >> +CVE: CVE-2026-118370 >> +Upstream-Status: Backport [https://github.com/libexpat/libexpat/pull/1450] > > Hello, > > I'll take this patch for now but, please, in the future: > Either import the whole pull request as one patch or reference the > commits in Upstream-Status: Backport. > > For example, this one is https://github.com/libexpat/libexpat/commit/1bac53c4fc460a03cd9860f39501c7979f6750ae. > > Thanks! Sure, I'll note this down. Also, I will fix this here if ever there's a need for a v3. -- Best regards, João Marcos Costa ^ permalink raw reply [flat|nested] 5+ messages in thread
* [blacksail][PATCH 2/2] expat: fix CVE-2026-117610 2026-11-18 10:30 [blacksail][PATCH 0/2] expat: fix High scored CVEs João Marcos Costa (Schneider Electric) 2026-11-18 10:30 ` [blacksail][PATCH 1/2] expat: fix CVE-2026-118370 João Marcos Costa (Schneider Electric) @ 2026-11-18 10:30 ` João Marcos Costa (Schneider Electric) 1 sibling, 0 replies; 5+ messages in thread From: João Marcos Costa (Schneider Electric) @ 2026-11-18 10:30 UTC (permalink / raw) To: openembedded-core Cc: thomas.petazzoni, yoann.congal, bastien.jauny, João Marcos Costa (Schneider Electric) This vulnerability, marked as High [1], was fixed upstream [2] since 2.10.0. Backport the fix to expat v2.8.3. This backport is actually partial. PR#1444 adds a second commit providing a new test case, but the code uses helper functions not yet defined/available. A few other commits would also need to be backported so that the test compiles at v2.8.3. [1] https://nvd.nist.gov/vuln/detail/cve-2026-117610 [2] https://github.com/libexpat/libexpat/pull/1444 Signed-off-by: João Marcos Costa (Schneider Electric) <joaomarcos.costa@bootlin.com> --- .../expat/expat/CVE-2026-117610.patch | 30 +++++++++++++++++++ meta/recipes-core/expat/expat_2.8.5.bb | 1 + 2 files changed, 31 insertions(+) create mode 100644 meta/recipes-core/expat/expat/CVE-2026-117610.patch diff --git a/meta/recipes-core/expat/expat/CVE-2026-117610.patch b/meta/recipes-core/expat/expat/CVE-2026-117610.patch new file mode 100644 index 0000000000..5843b4ac85 --- /dev/null +++ b/meta/recipes-core/expat/expat/CVE-2026-117610.patch @@ -0,0 +1,30 @@ +From 731159c29d2df0f98ba3a4c61e4bf5d0075acb63 Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping <sebastian@pipping.org> +Date: Mon, 26 Oct 2026 17:39:32 +0100 +Subject: [PATCH] lib: Fix initial non-final empty subparser call with a + handler + +CVE: CVE-2026-117610 +Upstream-Status: Backport [https://github.com/libexpat/libexpat/pull/1444/commits/bfc28346fa3efeb8ca56c17437d24a7344e5feab] +Signed-off-by: João Marcos Costa <joaomarcos.costa@bootlin.com> + +--- + lib/xmlparse.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/lib/xmlparse.c b/lib/xmlparse.c +index cb8839be..75c3a806 100644 +--- a/lib/xmlparse.c ++++ b/lib/xmlparse.c +@@ -3227,6 +3227,11 @@ externalEntityInitProcessor2(XML_Parser parser, const char *start, + } + parser->m_eventPtr = start; + return XML_ERROR_PARTIAL_CHAR; ++ case XML_TOK_NONE: ++ if (! parser->m_parsingStatus.finalBuffer) { ++ *endPtr = start; ++ } ++ return XML_ERROR_NONE; + } + parser->m_processor = externalEntityInitProcessor3; + return externalEntityInitProcessor3(parser, start, end, endPtr); diff --git a/meta/recipes-core/expat/expat_2.8.5.bb b/meta/recipes-core/expat/expat_2.8.5.bb index cca713d95f..2ee4a78afc 100644 --- a/meta/recipes-core/expat/expat_2.8.5.bb +++ b/meta/recipes-core/expat/expat_2.8.5.bb @@ -14,6 +14,7 @@ SRC_URI = "${GITHUB_BASE_URI}/download/R_${VERSION_TAG}/expat-${PV}.tar.bz2 \ file://CVE-2026-77214.patch \ file://CVE-2026-118370-01.patch \ file://CVE-2026-118370-02.patch \ + file://CVE-2026-117610.patch \ " GITHUB_BASE_URI = "https://github.com/libexpat/libexpat/releases/" -- 2.55.0 ^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-11-23 12:56 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-11-18 10:30 [blacksail][PATCH 0/2] expat: fix High scored CVEs João Marcos Costa (Schneider Electric) 2026-11-18 10:30 ` [blacksail][PATCH 1/2] expat: fix CVE-2026-118370 João Marcos Costa (Schneider Electric) 2026-11-23 11:33 ` Yoann Congal 2026-11-23 12:56 ` Joao Marcos Costa 2026-11-18 10:30 ` [blacksail][PATCH 2/2] expat: fix CVE-2026-117610 João Marcos Costa (Schneider Electric)
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.