sqlite3: fix multiple High scored CVEs
v2 cover sqlite3: fix multiple High scored CVEs
Hello,
These backports focus on the actual fix, ported from the original file (e.g. ext/session/sqlite3session.c) to sqlite3.c respecting the amalgamated SQLite layout, and do not include the changes in files such as 'manifest' and 'manifest.uuid'.
Best regards,
Changes since v1:
- split the previous CVE-2026-119374-pre.patch into two patches (thus pre1 and pre2) as the original content comes from 2 different commits.
João Marcos Costa (Schneider Electric) (3):
sqlite3: fix CVE-2026-119373
sqlite3: fix CVE-2026-119374
sqlite3: fix CVE-2026-119379
.../sqlite/sqlite3/CVE-2026-119373.patch | 48 +++++++++++++ .../sqlite/sqlite3/CVE-2026-119374-pre1.patch | 48 +++++++++++++ .../sqlite/sqlite3/CVE-2026-119374-pre2.patch | 63 +++++++++++++++++ .../sqlite/sqlite3/CVE-2026-119374.patch | 67 ++++++++++++++++++ .../sqlite/sqlite3/CVE-2026-119379.patch | 70 +++++++++++++++++++ meta/recipes-support/sqlite/sqlite3_3.45.3.bb | 7 +- 6 files changed, 302 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-support/sqlite/sqlite3/CVE-2026-119373.patch create mode 100644 meta/recipes-support/sqlite/sqlite3/CVE-2026-119374-pre1.patch create mode 100644 meta/recipes-support/sqlite/sqlite3/CVE-2026-119374-pre2.patch create mode 100644 meta/recipes-support/sqlite/sqlite3/CVE-2026-119374.patch create mode 100644 meta/recipes-support/sqlite/sqlite3/CVE-2026-119379.patch
Signature · 1 line
2.55.0
PATCH v2 1/3 sqlite3: fix CVE-2026-119373
This vulnerability, marked as High [1], was fixed upstream [2] since 3.54.0.
Backport the fix to sqlite v3.45.3.
[1] https://nvd.nist.gov/vuln/detail/cve-2026-119373
[2] https://github.com/sqlite/sqlite/commit/e1c9934f9f11a499029abb020ea715a08970da80
--- .../sqlite/sqlite3/CVE-2026-119373.patch | 48 +++++++++++++++++++ meta/recipes-support/sqlite/sqlite3_3.45.3.bb | 3 +- 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-support/sqlite/sqlite3/CVE-2026-119373.patch
meta/recipes-support/sqlite/sqlite3/CVE-2026-119373.patch new file +48 -0
@@ -0,0 +1,48 @@ +From ab37658e91b4a19923eb930a9e2ee62b561a4ec6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jo=C3=A3o=20Marcos=20Costa?= <[email protected]> +Date: Wed, 4 Nov 2026 16:38:46 +0100 +Subject: [PATCH] In fts5, account for the possibility of negative docids when + allocating a buffer to store the results of merging detail=none prefix lists. + Fix for report [bugs:/info/2026-08-04T08:49:27Z | 2026-08-04T08:49:27Z]. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +FossilOrigin-Name: a7f8c92f623e9cbe8a61266d949916acc9e5110c94dff4aa6fd1ad2ea8a60d4e + +CVE: CVE-2026-119373 +Upstream-Status: Backport [https://github.com/sqlite/sqlite/commit/e1c9934f9f11a499029abb020ea715a08970da80] + +Signed-off-by: João Marcos Costa <[email protected]> +--- + sqlite3.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/sqlite3.c b/sqlite3.c +index 6acf46a..2b1e6b9 100644 +--- a/sqlite3.c ++++ b/sqlite3.c +@@ -244805,7 +244805,7 @@ static void fts5MergeRowidLists( + (void)nBuf; + memset(&out, 0, sizeof(out)); + assert( nBuf==1 ); +- sqlite3Fts5BufferSize(&p->rc, &out, p1->n + p2->n); ++ sqlite3Fts5BufferSize(&p->rc, &out, p1->n + p2->n + 9); + if( p->rc ) return; + + fts5NextRowid(p1, &i1, &iRowid1); +@@ -244813,12 +244813,12 @@ static void fts5MergeRowidLists( + while( i1>=0 || i2>=0 ){ + if( i1>=0 && (i2<0 || iRowid1<iRowid2) ){ + assert( iOut==0 || iRowid1>iOut ); +- fts5BufferSafeAppendVarint(&out, iRowid1 - iOut); ++ fts5BufferSafeAppendVarint(&out, (u64)iRowid1 - (u64)iOut); + iOut = iRowid1; + fts5NextRowid(p1, &i1, &iRowid1); + }else{ + assert( iOut==0 || iRowid2>iOut ); +- fts5BufferSafeAppendVarint(&out, iRowid2 - iOut); ++ fts5BufferSafeAppendVarint(&out, (u64)iRowid2 - (u64)iOut); + iOut = iRowid2; + if( i1>=0 && iRowid1==iRowid2 ){ + fts5NextRowid(p1, &i1, &iRowid1);
meta/recipes-support/sqlite/sqlite3_3.45.3.bb +2 -1
@@ -10,6 +10,7 @@ SRC_URI = "http://www.sqlite.org/2024/sqlite-autoconf-${SQLITE_PV}.tar.gz \ file://CVE-2025-7709.patch \ file://CVE-2025-70873.patch \ file://CVE-2026-11822_CVE-2026-11824.patch \ - " + file://CVE-2026-119373.patch \ +" SRC_URI[sha256sum] = "b2809ca53124c19c60f42bf627736eae011afdcc205bb48270a5ee9a38191531"
Signature · 1 line
2.55.0
RE: [OE-core] [scarthgap][PATCH v2 1/3] sqlite3: fix CVE-2026-119373
Hi João and Yoann,
Could you add a Backport Changes: section to the inner CVE-2026-119373.patch header? The upstream fix changes ext/fts5/fts5_index.c, while this backport applies it to sqlite3.c. Please also explain why ext/fts5/test/fts5prefix2.test, manifest, and manifest.uuid are omitted.
Thanks,
Devansh
________________________________
From: Joao Marcos Costa via openembedded-core <[email protected]>
Sent: Wednesday, 25 November 2026 14:52:37
To: [email protected] <[email protected]>
Cc: [email protected] <[email protected]>; [email protected] <[email protected]>; João Marcos Costa (Schneider Electric) <[email protected]>
Subject: [OE-core] [scarthgap][PATCH v2 1/3] sqlite3: fix CVE-2026-119373
This vulnerability, marked as High [1], was fixed upstream [2] since 3.54.0.
Backport the fix to sqlite v3.45.3.
[1] https://nvd.nist.gov/vuln/detail/cve-2026-119373
[2] https://github.com/sqlite/sqlite/commit/e1c9934f9f11a499029abb020ea715a08970da80
--- .../sqlite/sqlite3/CVE-2026-119373.patch | 48 +++++++++++++++++++ meta/recipes-support/sqlite/sqlite3_3.45.3.bb | 3 +- 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-support/sqlite/sqlite3/CVE-2026-119373.patch
meta/recipes-support/sqlite/sqlite3/CVE-2026-119373.patch new file +48 -0
@@ -0,0 +1,48 @@ +From ab37658e91b4a19923eb930a9e2ee62b561a4ec6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jo=C3=A3o=20Marcos=20Costa?= <[email protected]> +Date: Wed, 4 Nov 2026 16:38:46 +0100 +Subject: [PATCH] In fts5, account for the possibility of negative docids when + allocating a buffer to store the results of merging detail=none prefix lists. + Fix for report [bugs:/info/2026-08-04T08:49:27Z | 2026-08-04T08:49:27Z]. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +FossilOrigin-Name: a7f8c92f623e9cbe8a61266d949916acc9e5110c94dff4aa6fd1ad2ea8a60d4e + +CVE: CVE-2026-119373 +Upstream-Status: Backport [https://github.com/sqlite/sqlite/commit/e1c9934f9f11a499029abb020ea715a08970da80] + +Signed-off-by: João Marcos Costa <[email protected]> +--- + sqlite3.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/sqlite3.c b/sqlite3.c +index 6acf46a..2b1e6b9 100644 +--- a/sqlite3.c ++++ b/sqlite3.c +@@ -244805,7 +244805,7 @@ static void fts5MergeRowidLists( + (void)nBuf; + memset(&out, 0, sizeof(out)); + assert( nBuf==1 ); +- sqlite3Fts5BufferSize(&p->rc, &out, p1->n + p2->n); ++ sqlite3Fts5BufferSize(&p->rc, &out, p1->n + p2->n + 9); + if( p->rc ) return; + + fts5NextRowid(p1, &i1, &iRowid1); +@@ -244813,12 +244813,12 @@ static void fts5MergeRowidLists( + while( i1>=0 || i2>=0 ){ + if( i1>=0 && (i2<0 || iRowid1<iRowid2) ){ + assert( iOut==0 || iRowid1>iOut ); +- fts5BufferSafeAppendVarint(&out, iRowid1 - iOut); ++ fts5BufferSafeAppendVarint(&out, (u64)iRowid1 - (u64)iOut); + iOut = iRowid1; + fts5NextRowid(p1, &i1, &iRowid1); + }else{ + assert( iOut==0 || iRowid2>iOut ); +- fts5BufferSafeAppendVarint(&out, iRowid2 - iOut); ++ fts5BufferSafeAppendVarint(&out, (u64)iRowid2 - (u64)iOut); + iOut = iRowid2; + if( i1>=0 && iRowid1==iRowid2 ){ + fts5NextRowid(p1, &i1, &iRowid1);
meta/recipes-support/sqlite/sqlite3_3.45.3.bb +2 -1
@@ -10,6 +10,7 @@ SRC_URI = "http://www.sqlite.org/2024/sqlite-autoconf-${SQLITE_PV}.tar.gz \ file://CVE-2025-7709.patch \ file://CVE-2025-70873.patch \ file://CVE-2026-11822_CVE-2026-11824.patch \ - " + file://CVE-2026-119373.patch \ +" SRC_URI[sha256sum] = "b2809ca53124c19c60f42bf627736eae011afdcc205bb48270a5ee9a38191531"
--
2.55.0
Re: [OE-core] [scarthgap][PATCH v2 1/3] sqlite3: fix CVE-2026-119373
Hello, Devansh (cc Yoann)
Quoted 7 lines · On 11/26/26 9:20 AM, Devansh Patel -X (devanshp - E INFOCHIPS PRIVATE LIMITED…
Hi João and Yoann,
Could you add a Backport Changes: section to the inner CVE-2026-119373.patch header? The upstream fix changes ext/fts5/
fts5_index.c, while this backport applies it tosqlite3.c. Please also explain why ext/fts5/test/fts5prefix2.test, manifest, and manifest.uuid are omitted.Thanks,
Devansh
------------------------------------------------------------------------
Sure, I'm preparing a v3. Same for the other 2 patches in this series.
Signature · 2 lines
Best regards, João Marcos Costa
Re: [OE-core] [scarthgap][PATCH v2 1/3] sqlite3: fix CVE-2026-119373
Quoted 12 lines · Joao Marcos Costa
Hello, Devansh (cc Yoann)
Quoted 8 lines · On 11/26/26 9:20 AM, Devansh Patel -X (devanshp - E INFOCHIPS PRIVATE LIMITED…
Hi João and Yoann,
Could you add a Backport Changes: section to the inner CVE-2026-119373.patch header? The upstream fix changes ext/fts5/
fts5_index.c, while this backport applies it tosqlite3.c. Please also explain why ext/fts5/test/fts5prefix2.test, manifest, and manifest.uuid are omitted.
Quoted 5 lines
Quoted 3 lines
Thanks,
Devansh
------------------------------------------------------------------------Sure, I'm preparing a v3. Same for the other 2 patches in this series.
Devansh, Joao: beware of what is in the current review branch:
https://lore.kernel.org/openembedded-core/[email protected]/
Can you reply in this^ thread if anything needs changing?
FYI, there is some level of appreciation from me for when I judge if a "Backport Changes:" is needed/appreciated/required.
For exemple:
* dropping NEWS change is not needed,
* dropping test is appreciated but not required
* and after reading enough sqlite3 patches the source layout change becomes obvious so I did not judged it needed this time.
Regards,
Signature · 2 lines
Yoann Congal Smile ECS
PATCH v2 2/3 sqlite3: fix CVE-2026-119374
In reply to João Marcos Costa (Schneider Electric)This vulnerability, marked as High [1], was fixed upstream [2] since 3.54.0.
Backport the fix to sqlite v3.45.3.
Some function/macro definitions are required to compile the backported code, and they are provided in the *-pre*.patch files.
[1] https://nvd.nist.gov/vuln/detail/cve-2026-119374
[2] https://github.com/sqlite/sqlite/commit/d9de6eedbe918c074c7556400fa21df5960704d9
--- .../sqlite/sqlite3/CVE-2026-119374-pre1.patch | 48 +++++++++++++ .../sqlite/sqlite3/CVE-2026-119374-pre2.patch | 63 +++++++++++++++++ .../sqlite/sqlite3/CVE-2026-119374.patch | 67 +++++++++++++++++++ meta/recipes-support/sqlite/sqlite3_3.45.3.bb | 3 + 4 files changed, 181 insertions(+) create mode 100644 meta/recipes-support/sqlite/sqlite3/CVE-2026-119374-pre1.patch create mode 100644 meta/recipes-support/sqlite/sqlite3/CVE-2026-119374-pre2.patch create mode 100644 meta/recipes-support/sqlite/sqlite3/CVE-2026-119374.patch
meta/recipes-support/sqlite/sqlite3/CVE-2026-119374-pre1.patch new file +48 -0
@@ -0,0 +1,48 @@ +From f9e6373f9cbd1d10d01441a03def5fa08b4202d1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jo=C3=A3o=20Marcos=20Costa?= <[email protected]> +Date: Wed, 25 Nov 2026 14:49:35 +0100 +Subject: [PATCH] sqlite3.c: add sqlite3Fts5ConfigErrmsg helper +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This function was introduced at [1], and it is required by the backport patch for CVE-2026-119374. + +Please note this is a partial backport, whose sole purpose is to include +sqlite3Fts5ConfigErrmsg()'s definition. + +[1] https://github.com/sqlite/sqlite/commit/2ec78c0e4bab11ce288a830c3a13fe34a9224c4a + +Upstream-Status: Backport [https://github.com/sqlite/sqlite/commit/2ec78c0e4bab11ce288a830c3a13fe34a9224c4a] + +Signed-off-by: João Marcos Costa <[email protected]> +--- + sqlite3.c | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/sqlite3.c b/sqlite3.c +index 88b1810..1bf28ac 100644 +--- a/sqlite3.c ++++ b/sqlite3.c +@@ -239370,6 +239370,21 @@ struct Fts5SegIter { + u8 bDel; /* True if the delete flag is set */ + }; + ++void sqlite3Fts5ConfigErrmsg(Fts5Config *pConfig, const char *zFmt, ...){ ++ va_list ap; /* ... printf arguments */ ++ char *zMsg = 0; ++ ++ va_start(ap, zFmt); ++ zMsg = sqlite3_vmprintf(zFmt, ap); ++ if( pConfig->pzErrmsg ){ ++ *pConfig->pzErrmsg = zMsg; ++ }else{ ++ sqlite3_free(zMsg); ++ } ++ ++ va_end(ap); ++} ++ + /* + ** Array of tombstone pages. Reference counted. + */
meta/recipes-support/sqlite/sqlite3/CVE-2026-119374-pre2.patch new file +63 -0
63 lines not on this page · raw message
meta/recipes-support/sqlite/sqlite3/CVE-2026-119374.patch new file +67 -0
67 lines not on this page · raw message
meta/recipes-support/sqlite/sqlite3_3.45.3.bb +3 -0
@@ -11,6 +11,9 @@ SRC_URI = "http://www.sqlite.org/2024/sqlite-autoconf-${SQLITE_PV}.tar.gz \ file://CVE-2025-70873.patch \ file://CVE-2026-11822_CVE-2026-11824.patch \ file://CVE-2026-119373.patch \ + file://CVE-2026-119374-pre1.patch \ + file://CVE-2026-119374-pre2.patch \ + file://CVE-2026-119374.patch \ " SRC_URI[sha256sum] = "b2809ca53124c19c60f42bf627736eae011afdcc205bb48270a5ee9a38191531"
Signature · 1 line
2.55.0
RE: [OE-core] [scarthgap][PATCH v2 2/3] sqlite3: fix CVE-2026-119374
Hi João and Yoann,
Could you add a Backport Changes: section to the inner CVE-2026-119374.patch header? The upstream fix changes ext/fts5/fts5_index.c, while this backport applies it to sqlite3.c. Please also explain why ext/fts5/test/fts5corruptB.test, manifest, and manifest.uuid are omitted.
Thanks,
Devansh
________________________________
From: Joao Marcos Costa via openembedded-core <[email protected]>
Sent: Wednesday, 25 November 2026 14:52:38
To: [email protected] <[email protected]>
Cc: [email protected] <[email protected]>; [email protected] <[email protected]>; João Marcos Costa (Schneider Electric) <[email protected]>
Subject: [OE-core] [scarthgap][PATCH v2 2/3] sqlite3: fix CVE-2026-119374
This vulnerability, marked as High [1], was fixed upstream [2] since 3.54.0.
Backport the fix to sqlite v3.45.3.
Some function/macro definitions are required to compile the backported code, and they are provided in the *-pre*.patch files.
[1] https://nvd.nist.gov/vuln/detail/cve-2026-119374
[2] https://github.com/sqlite/sqlite/commit/d9de6eedbe918c074c7556400fa21df5960704d9
--- .../sqlite/sqlite3/CVE-2026-119374-pre1.patch | 48 +++++++++++++ .../sqlite/sqlite3/CVE-2026-119374-pre2.patch | 63 +++++++++++++++++ .../sqlite/sqlite3/CVE-2026-119374.patch | 67 +++++++++++++++++++ meta/recipes-support/sqlite/sqlite3_3.45.3.bb | 3 + 4 files changed, 181 insertions(+) create mode 100644 meta/recipes-support/sqlite/sqlite3/CVE-2026-119374-pre1.patch create mode 100644 meta/recipes-support/sqlite/sqlite3/CVE-2026-119374-pre2.patch create mode 100644 meta/recipes-support/sqlite/sqlite3/CVE-2026-119374.patch
meta/recipes-support/sqlite/sqlite3/CVE-2026-119374-pre1.patch new file +48 -0
@@ -0,0 +1,48 @@ +From f9e6373f9cbd1d10d01441a03def5fa08b4202d1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jo=C3=A3o=20Marcos=20Costa?= <[email protected]> +Date: Wed, 25 Nov 2026 14:49:35 +0100 +Subject: [PATCH] sqlite3.c: add sqlite3Fts5ConfigErrmsg helper +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This function was introduced at [1], and it is required by the backport patch for CVE-2026-119374. + +Please note this is a partial backport, whose sole purpose is to include +sqlite3Fts5ConfigErrmsg()'s definition. + +[1] https://github.com/sqlite/sqlite/commit/2ec78c0e4bab11ce288a830c3a13fe34a9224c4a + +Upstream-Status: Backport [https://github.com/sqlite/sqlite/commit/2ec78c0e4bab11ce288a830c3a13fe34a9224c4a] + +Signed-off-by: João Marcos Costa <[email protected]> +--- + sqlite3.c | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/sqlite3.c b/sqlite3.c +index 88b1810..1bf28ac 100644 +--- a/sqlite3.c ++++ b/sqlite3.c +@@ -239370,6 +239370,21 @@ struct Fts5SegIter { + u8 bDel; /* True if the delete flag is set */ + }; + ++void sqlite3Fts5ConfigErrmsg(Fts5Config *pConfig, const char *zFmt, ...){ ++ va_list ap; /* ... printf arguments */ ++ char *zMsg = 0; ++ ++ va_start(ap, zFmt); ++ zMsg = sqlite3_vmprintf(zFmt, ap); ++ if( pConfig->pzErrmsg ){ ++ *pConfig->pzErrmsg = zMsg; ++ }else{ ++ sqlite3_free(zMsg); ++ } ++ ++ va_end(ap); ++} ++ + /* + ** Array of tombstone pages. Reference counted. + */
meta/recipes-support/sqlite/sqlite3/CVE-2026-119374-pre2.patch new file +63 -0
63 lines not on this page · raw message
meta/recipes-support/sqlite/sqlite3/CVE-2026-119374.patch new file +67 -0
67 lines not on this page · raw message
meta/recipes-support/sqlite/sqlite3_3.45.3.bb +3 -0
@@ -11,6 +11,9 @@ SRC_URI = "http://www.sqlite.org/2024/sqlite-autoconf-${SQLITE_PV}.tar.gz \ file://CVE-2025-70873.patch \ file://CVE-2026-11822_CVE-2026-11824.patch \ file://CVE-2026-119373.patch \ + file://CVE-2026-119374-pre1.patch \ + file://CVE-2026-119374-pre2.patch \ + file://CVE-2026-119374.patch \ " SRC_URI[sha256sum] = "b2809ca53124c19c60f42bf627736eae011afdcc205bb48270a5ee9a38191531"
--
2.55.0
PATCH v2 3/3 sqlite3: fix CVE-2026-119379
In reply to João Marcos Costa (Schneider Electric)This vulnerability, marked as High [1], was fixed upstream [2] since 3.54.0.
Backport the fix to sqlite v3.45.3.
[1] https://nvd.nist.gov/vuln/detail/cve-2026-119379
[2] https://github.com/sqlite/sqlite/commit/64459c87cc702d600704fb77ee40ca1782398a52
--- .../sqlite/sqlite3/CVE-2026-119379.patch | 70 +++++++++++++++++++ meta/recipes-support/sqlite/sqlite3_3.45.3.bb | 1 + 2 files changed, 71 insertions(+) create mode 100644 meta/recipes-support/sqlite/sqlite3/CVE-2026-119379.patch
meta/recipes-support/sqlite/sqlite3/CVE-2026-119379.patch new file +70 -0
@@ -0,0 +1,70 @@ +From 56618802689fc81664d5e461da93026998a6b6bb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jo=C3=A3o=20Marcos=20Costa?= <[email protected]> +Date: Thu, 5 Nov 2026 12:06:23 +0100 +Subject: [PATCH] Avoid a buffer overrun when processing a strategically + corrupted changeset. Report [bugs:/info/2026-08-16T10:15:25Z | + 2026-08-16T10:15:25Z]. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +FossilOrigin-Name: 3f57024aecea0f3b565ed823cf94b085031c481fd6323c1f2e4319a53500864f + +CVE: CVE-2026-119379 +Upstream-Status: Backport [https://github.com/sqlite/sqlite/commit/64459c87cc702d600704fb77ee40ca1782398a52] + +Signed-off-by: João Marcos Costa <[email protected]> +--- + sqlite3.c | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +diff --git a/sqlite3.c b/sqlite3.c +index 2b1e6b9..88b1810 100644 +--- a/sqlite3.c ++++ b/sqlite3.c +@@ -228393,9 +228393,9 @@ static int sessionChangesetApply( + int schemaMismatch = 0; + int rc = SQLITE_OK; /* Return code */ + const char *zTab = 0; /* Name of current table */ +- int nTab = 0; /* Result of sqlite3Strlen30(zTab) */ + SessionApplyCtx sApply; /* changeset_apply() context object */ + int bPatchset; ++ int bNew = 0; /* True for first entry of new table */ + + assert( xConflict!=0 ); + +@@ -228411,15 +228411,16 @@ static int sessionChangesetApply( + if( rc==SQLITE_OK ){ + rc = sqlite3_exec(db, "PRAGMA defer_foreign_keys = 1", 0, 0, 0); + } +- while( rc==SQLITE_OK && SQLITE_ROW==sqlite3changeset_next(pIter) ){ ++ while( rc==SQLITE_OK && SQLITE_ROW==sessionChangesetNext(pIter, 0, 0,&bNew) ){ + int nCol; + int op; + const char *zNew; + + sqlite3changeset_op(pIter, &zNew, &nCol, &op, 0); + +- if( zTab==0 || sqlite3_strnicmp(zNew, zTab, nTab+1) ){ ++ if( bNew ){ + u8 *abPK; ++ bNew = 0; + + rc = sessionRetryConstraints( + db, pIter->bPatchset, zTab, &sApply, xConflict, pCtx +@@ -228454,7 +228455,6 @@ static int sessionChangesetApply( + rc = SQLITE_NOMEM; + break; + } +- nTab = (int)strlen(zTab); + sApply.azCol = (const char **)zTab; + }else{ + int nMinCol = 0; +@@ -228506,7 +228506,6 @@ static int sessionChangesetApply( + sApply.bStat1 = 0; + } + } +- nTab = sqlite3Strlen30(zTab); + } + } +
meta/recipes-support/sqlite/sqlite3_3.45.3.bb +1 -0
@@ -14,6 +14,7 @@ SRC_URI = "http://www.sqlite.org/2024/sqlite-autoconf-${SQLITE_PV}.tar.gz \ file://CVE-2026-119374-pre1.patch \ file://CVE-2026-119374-pre2.patch \ file://CVE-2026-119374.patch \ + file://CVE-2026-119379.patch \ " SRC_URI[sha256sum] = "b2809ca53124c19c60f42bf627736eae011afdcc205bb48270a5ee9a38191531"
Signature · 1 line
2.55.0
RE: [OE-core] [scarthgap][PATCH v2 3/3] sqlite3: fix CVE-2026-119379
Hi João and Yoann,
Could you add a Backport Changes: section to the inner CVE-2026-119379.patch header? The upstream fix changes ext/session/sqlite3session.c, while this backport applies it to sqlite3.c. Please also explain why ext/session/sessioncorrupt.test, manifest, and manifest.uuid are omitted.
Thanks,
Devansh
________________________________
From: Joao Marcos Costa via openembedded-core <[email protected]>
Sent: Wednesday, 25 November 2026 14:52:39
To: [email protected] <[email protected]>
Cc: [email protected] <[email protected]>; [email protected] <[email protected]>; João Marcos Costa (Schneider Electric) <[email protected]>
Subject: [OE-core] [scarthgap][PATCH v2 3/3] sqlite3: fix CVE-2026-119379
This vulnerability, marked as High [1], was fixed upstream [2] since 3.54.0.
Backport the fix to sqlite v3.45.3.
[1] https://nvd.nist.gov/vuln/detail/cve-2026-119379
[2] https://github.com/sqlite/sqlite/commit/64459c87cc702d600704fb77ee40ca1782398a52
--- .../sqlite/sqlite3/CVE-2026-119379.patch | 70 +++++++++++++++++++ meta/recipes-support/sqlite/sqlite3_3.45.3.bb | 1 + 2 files changed, 71 insertions(+) create mode 100644 meta/recipes-support/sqlite/sqlite3/CVE-2026-119379.patch
meta/recipes-support/sqlite/sqlite3/CVE-2026-119379.patch new file +70 -0
@@ -0,0 +1,70 @@ +From 56618802689fc81664d5e461da93026998a6b6bb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jo=C3=A3o=20Marcos=20Costa?= <[email protected]> +Date: Thu, 5 Nov 2026 12:06:23 +0100 +Subject: [PATCH] Avoid a buffer overrun when processing a strategically + corrupted changeset. Report [bugs:/info/2026-08-16T10:15:25Z | + 2026-08-16T10:15:25Z]. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +FossilOrigin-Name: 3f57024aecea0f3b565ed823cf94b085031c481fd6323c1f2e4319a53500864f + +CVE: CVE-2026-119379 +Upstream-Status: Backport [https://github.com/sqlite/sqlite/commit/64459c87cc702d600704fb77ee40ca1782398a52] + +Signed-off-by: João Marcos Costa <[email protected]> +--- + sqlite3.c | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +diff --git a/sqlite3.c b/sqlite3.c +index 2b1e6b9..88b1810 100644 +--- a/sqlite3.c ++++ b/sqlite3.c +@@ -228393,9 +228393,9 @@ static int sessionChangesetApply( + int schemaMismatch = 0; + int rc = SQLITE_OK; /* Return code */ + const char *zTab = 0; /* Name of current table */ +- int nTab = 0; /* Result of sqlite3Strlen30(zTab) */ + SessionApplyCtx sApply; /* changeset_apply() context object */ + int bPatchset; ++ int bNew = 0; /* True for first entry of new table */ + + assert( xConflict!=0 ); + +@@ -228411,15 +228411,16 @@ static int sessionChangesetApply( + if( rc==SQLITE_OK ){ + rc = sqlite3_exec(db, "PRAGMA defer_foreign_keys = 1", 0, 0, 0); + } +- while( rc==SQLITE_OK && SQLITE_ROW==sqlite3changeset_next(pIter) ){ ++ while( rc==SQLITE_OK && SQLITE_ROW==sessionChangesetNext(pIter, 0, 0,&bNew) ){ + int nCol; + int op; + const char *zNew; + + sqlite3changeset_op(pIter, &zNew, &nCol, &op, 0); + +- if( zTab==0 || sqlite3_strnicmp(zNew, zTab, nTab+1) ){ ++ if( bNew ){ + u8 *abPK; ++ bNew = 0; + + rc = sessionRetryConstraints( + db, pIter->bPatchset, zTab, &sApply, xConflict, pCtx +@@ -228454,7 +228455,6 @@ static int sessionChangesetApply( + rc = SQLITE_NOMEM; + break; + } +- nTab = (int)strlen(zTab); + sApply.azCol = (const char **)zTab; + }else{ + int nMinCol = 0; +@@ -228506,7 +228506,6 @@ static int sessionChangesetApply( + sApply.bStat1 = 0; + } + } +- nTab = sqlite3Strlen30(zTab); + } + } +
meta/recipes-support/sqlite/sqlite3_3.45.3.bb +1 -0
@@ -14,6 +14,7 @@ SRC_URI = "http://www.sqlite.org/2024/sqlite-autoconf-${SQLITE_PV}.tar.gz \ file://CVE-2026-119374-pre1.patch \ file://CVE-2026-119374-pre2.patch \ file://CVE-2026-119374.patch \ + file://CVE-2026-119379.patch \ " SRC_URI[sha256sum] = "b2809ca53124c19c60f42bf627736eae011afdcc205bb48270a5ee9a38191531"
--
2.55.0