From patchwork Tue Dec 1 13:54:20 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jo=C3=A3o_Marcos_Costa_=28Schneider_Electric=29?= X-Patchwork-Id: 106802 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.11383.1796134008739622758 for ; Tue, 01 Dec 2026 06:06:49 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bootlin.com header.s=dkim header.b=nLBZwkf0; spf=pass (domain: bootlin.com, ip: 185.246.85.4, mailfrom: joaomarcos.costa@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 082D84E41834; Tue, 1 Dec 2026 14:06:47 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id CBB1A603CB; Tue, 1 Dec 2026 14:06:46 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 8C73511EA25BF; Tue, 01 Dec 2026 15:06:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1796134006; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=OFYzjHlcDKosbQ7+BNOwJJCdkq+rO0UdZkc6oaff6GA=; b=nLBZwkf0JKoJ28/9zVQc81Lkbs15jJdipvuFM9PEWK8YBiK92SSQ7nNBB/sYgiPOM8SOYM SlPmQWY+9dD+AePFAxrjQjjPdfmgrbEmtbHsq91CdJ0Pm2Nj16v98rmsYz/264nJ6g/p4w aS13blao0o8ZdnC+8ZTUspBcrG6G7t9AOIoz5wNtwi5ZDF7cjLiR140oDyyFZesqHfLay5 gv1kpV2lBsCSQVm+sdYd0saygXCX2AE1tgapemsf+TzldSqaUP5011X5UMkKjFwGgrPzmj 6w5y4QsjiYOUA5/uPbUaqz2x30ajD4ywDnrvf6uZbaZf6rz7VvwEs3qOgPm2eg== From: =?utf-8?q?Jo=C3=A3o_Marcos_Costa_=28Schneider_Electric=29?= To: openembedded-core@lists.openembedded.org Cc: thomas.petazzoni@bootlin.com, yoann.congal@smile.fr, devanshp@cisco.com, =?utf-8?q?Jo=C3=A3o_Marcos_Costa_=28Schneider_Electric=29?= Subject: [scarthgap][PATCH v3 1/3] sqlite3: fix CVE-2026-119373 Date: Tue, 1 Dec 2026 14:54:20 +0100 Message-ID: <20261201135422.739530-2-joaomarcos.costa@bootlin.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261201135422.739530-1-joaomarcos.costa@bootlin.com> References: <20261201135422.739530-1-joaomarcos.costa@bootlin.com> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Tue, 01 Dec 2026 14:06:58 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/251737 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 Signed-off-by: João Marcos Costa (Schneider Electric) --- .../sqlite/sqlite3/CVE-2026-119373.patch | 58 +++++++++++++++++++ meta/recipes-support/sqlite/sqlite3_3.45.3.bb | 3 +- 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-support/sqlite/sqlite3/CVE-2026-119373.patch diff --git a/meta/recipes-support/sqlite/sqlite3/CVE-2026-119373.patch b/meta/recipes-support/sqlite/sqlite3/CVE-2026-119373.patch new file mode 100644 index 0000000000..fc1dfbc06d --- /dev/null +++ b/meta/recipes-support/sqlite/sqlite3/CVE-2026-119373.patch @@ -0,0 +1,58 @@ +From 1f693d73ac2bef60a54f3fe6bdc7dfe71ac6ce1b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jo=C3=A3o=20Marcos=20Costa?= +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] + +Backport Changes: +- Applied the upstream fts5MergeRowidLists() fix from ext/fts5/fts5_index.c + to sqlite3.c because the Yocto sqlite-autoconf source uses the + amalgamated SQLite layout. +- Omitted ext/fts5/test/fts5prefix2.test because this extracted + recipe source contains the SQLite autoconf/amalgamation layout and + does not carry the upstream Tcl test tree. +- Omitted Git mirror metadata files manifest and manifest.uuid because + they are not required for the security fix in this source layout. + +Signed-off-by: João Marcos Costa (Schneider Electric) +--- + 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 || iRowid1iOut ); +- 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); diff --git a/meta/recipes-support/sqlite/sqlite3_3.45.3.bb b/meta/recipes-support/sqlite/sqlite3_3.45.3.bb index 975f3bdab8..e7c5bcdac4 100644 --- a/meta/recipes-support/sqlite/sqlite3_3.45.3.bb +++ b/meta/recipes-support/sqlite/sqlite3_3.45.3.bb @@ -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" From patchwork Tue Dec 1 13:54:21 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jo=C3=A3o_Marcos_Costa_=28Schneider_Electric=29?= X-Patchwork-Id: 106804 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.11384.1796134011067999941 for ; Tue, 01 Dec 2026 06:06:51 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bootlin.com header.s=dkim header.b=EVKsXtuC; spf=pass (domain: bootlin.com, ip: 185.171.202.116, mailfrom: joaomarcos.costa@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id D3F50C2B9CA; Tue, 1 Dec 2026 14:06:58 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 4F5B0603CB; Tue, 1 Dec 2026 14:06:48 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 5BFA811EA25B9; Tue, 01 Dec 2026 15:06:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1796134007; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=s5/DZflBxjBDFUmVkgodszxVbBOeccGVBVMLX6z8ZuA=; b=EVKsXtuC3zqFP08nFNp8ZApalm9pArhApJM2cPIcF5C+S0NYQPsTFFJ7JS1klzXPOt9tgY gWyvUQUyaC7bm6Lji3IMur/YexybcgZqRIqngV/fDS/MMsIvq+mSUhxkbOnMaXWt3QyEwC oMSe0noDwQ9/OZev5w/Kw/YSzuOW80BCm6QdtRt5peZivk03/vNQjEUr5ppp5vC303eqjR U1TESvRWwUOFRdyxgYaMeM/vFhpISrnwQatGMWj54KKTbEKLkdH/I9gg8JJrBDuxjBUuwd ph2l46XlBT2v1N6ok7jndg0cmXXxCFaM9y3zk9kRaPFbBnrKa5IiazeHLEk5wg== From: =?utf-8?q?Jo=C3=A3o_Marcos_Costa_=28Schneider_Electric=29?= To: openembedded-core@lists.openembedded.org Cc: thomas.petazzoni@bootlin.com, yoann.congal@smile.fr, devanshp@cisco.com, =?utf-8?q?Jo=C3=A3o_Marcos_Costa_=28Schneider_Electric=29?= Subject: [scarthgap][PATCH v3 2/3] sqlite3: fix CVE-2026-119374 Date: Tue, 1 Dec 2026 14:54:21 +0100 Message-ID: <20261201135422.739530-3-joaomarcos.costa@bootlin.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261201135422.739530-1-joaomarcos.costa@bootlin.com> References: <20261201135422.739530-1-joaomarcos.costa@bootlin.com> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Tue, 01 Dec 2026 14:06:59 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/251738 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 Signed-off-by: João Marcos Costa (Schneider Electric) --- .../sqlite/sqlite3/CVE-2026-119374-pre1.patch | 48 ++++++++++++ .../sqlite/sqlite3/CVE-2026-119374-pre2.patch | 63 +++++++++++++++ .../sqlite/sqlite3/CVE-2026-119374.patch | 77 +++++++++++++++++++ meta/recipes-support/sqlite/sqlite3_3.45.3.bb | 3 + 4 files changed, 191 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 diff --git a/meta/recipes-support/sqlite/sqlite3/CVE-2026-119374-pre1.patch b/meta/recipes-support/sqlite/sqlite3/CVE-2026-119374-pre1.patch new file mode 100644 index 0000000000..7389a0360d --- /dev/null +++ b/meta/recipes-support/sqlite/sqlite3/CVE-2026-119374-pre1.patch @@ -0,0 +1,48 @@ +From 6cacfd570351dd29f8b77cb5b4f8d998c153f25e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jo=C3=A3o=20Marcos=20Costa?= +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 (Schneider Electric) +--- + sqlite3.c | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/sqlite3.c b/sqlite3.c +index 2b1e6b9..2e72623 100644 +--- a/sqlite3.c ++++ b/sqlite3.c +@@ -239371,6 +239371,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. + */ diff --git a/meta/recipes-support/sqlite/sqlite3/CVE-2026-119374-pre2.patch b/meta/recipes-support/sqlite/sqlite3/CVE-2026-119374-pre2.patch new file mode 100644 index 0000000000..46c08a2141 --- /dev/null +++ b/meta/recipes-support/sqlite/sqlite3/CVE-2026-119374-pre2.patch @@ -0,0 +1,63 @@ +From 510868087841ded36812a35629d6a45ea210b4c8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jo=C3=A3o=20Marcos=20Costa?= +Date: Wed, 25 Nov 2026 14:58:50 +0100 +Subject: [PATCH] sqlite3.c: add fts5IndexCorrupt* helpers +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +These macros/functions were introduced at [1], and they are required by the backport patch for CVE-2026-119374. + +Please note this is a partial backport, whose sole purpose is to include +the definitions for FTS5_CORRUPT_ROWID, FTS5_CORRUPT_ITER, and +FTS5_CORRUPT_IDX. + +[1] https://github.com/sqlite/sqlite/commit/fe182f74b28db7db54656a19de97069e1ac69470 + +Upstream-Status: Backport [https://github.com/sqlite/sqlite/commit/fe182f74b28db7db54656a19de97069e1ac69470] + +Signed-off-by: João Marcos Costa (Schneider Electric) +--- + sqlite3.c | 29 +++++++++++++++++++++++++++++ + 1 file changed, 29 insertions(+) + +diff --git a/sqlite3.c b/sqlite3.c +index 2e72623..4d0513e 100644 +--- a/sqlite3.c ++++ b/sqlite3.c +@@ -239386,6 +239386,35 @@ void sqlite3Fts5ConfigErrmsg(Fts5Config *pConfig, const char *zFmt, ...){ + va_end(ap); + } + ++static int fts5IndexCorruptRowid(Fts5Index *pIdx, i64 iRowid){ ++ pIdx->rc = FTS5_CORRUPT; ++ sqlite3Fts5ConfigErrmsg(pIdx->pConfig, ++ "fts5: corruption found reading blob %lld from table \"%s\"", ++ iRowid, pIdx->pConfig->zName ++ ); ++ return SQLITE_CORRUPT_VTAB; ++} ++#define FTS5_CORRUPT_ROWID(pIdx, iRowid) fts5IndexCorruptRowid(pIdx, iRowid) ++ ++static int fts5IndexCorruptIter(Fts5Index *pIdx, Fts5SegIter *pIter){ ++ pIdx->rc = FTS5_CORRUPT; ++ sqlite3Fts5ConfigErrmsg(pIdx->pConfig, ++ "fts5: corruption on page %d, segment %d, table \"%s\"", ++ pIter->iLeafPgno, pIter->pSeg->iSegid, pIdx->pConfig->zName ++ ); ++ return SQLITE_CORRUPT_VTAB; ++} ++#define FTS5_CORRUPT_ITER(pIdx, pIter) fts5IndexCorruptIter(pIdx, pIter) ++ ++static int fts5IndexCorruptIdx(Fts5Index *pIdx){ ++ pIdx->rc = FTS5_CORRUPT; ++ sqlite3Fts5ConfigErrmsg(pIdx->pConfig, ++ "fts5: corruption in table \"%s\"", pIdx->pConfig->zName ++ ); ++ return SQLITE_CORRUPT_VTAB; ++} ++#define FTS5_CORRUPT_IDX(pIdx) fts5IndexCorruptIdx(pIdx) ++ + /* + ** Array of tombstone pages. Reference counted. + */ diff --git a/meta/recipes-support/sqlite/sqlite3/CVE-2026-119374.patch b/meta/recipes-support/sqlite/sqlite3/CVE-2026-119374.patch new file mode 100644 index 0000000000..73a26d742f --- /dev/null +++ b/meta/recipes-support/sqlite/sqlite3/CVE-2026-119374.patch @@ -0,0 +1,77 @@ +From 3fd778cd4c43e0f718f04141fc069bdc9c24e563 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jo=C3=A3o=20Marcos=20Costa?= +Date: Wed, 4 Nov 2026 17:07:06 +0100 +Subject: [PATCH] Fix a problem in fts5 secure-delete code that could lead to a + buffer overrun when dealing with a strategically corrupted database. Problem + reported by YEONBA. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +FossilOrigin-Name: 9cd4f9e9205c5a5096388397a39349db9ff5377d19095c6b20388ff799969c31 + +CVE: CVE-2026-119374 +Upstream-Status: Backport [https://github.com/sqlite/sqlite/commit/d9de6eedbe918c074c7556400fa21df5960704d9] + +Backport Changes: +- Applied the upstream fts5DoSecureDelete() fix from ext/fts5/fts5_index.c + to sqlite3.c because the Yocto sqlite-autoconf source uses the + amalgamated SQLite layout. +- Omitted ext/fts5/test/fts5corruptB.test because this extracted + recipe source contains the SQLite autoconf/amalgamation layout and + does not carry the upstream Tcl test tree. +- Omitted Git mirror metadata files manifest and manifest.uuid because + they are not required for the security fix in this source layout. + +Signed-off-by: João Marcos Costa (Schneider Electric) +--- + sqlite3.c | 17 +++++++++++------ + 1 file changed, 11 insertions(+), 6 deletions(-) + +diff --git a/sqlite3.c b/sqlite3.c +index 4d0513e..3ba2e27 100644 +--- a/sqlite3.c ++++ b/sqlite3.c +@@ -244287,31 +244287,36 @@ static void fts5DoSecureDelete( + const int nMove = nPg - iNextOff; /* Number of bytes to move */ + int nShift = iNextOff - iOff; /* Distance to move them */ + ++ int nNewPg = 0; + int iPrevKeyOut = 0; +- int iKeyIn = 0; ++ i64 iKeyIn = 0; + + memmove(&aPg[iOff], &aPg[iNextOff], nMove); + iPgIdx -= nShift; +- nPg = iPgIdx; ++ nNewPg = iPgIdx; + fts5PutU16(&aPg[2], iPgIdx); + + for(iIdx=0; iIdxnPg ){ ++ FTS5_CORRUPT_IDX(p); ++ break; ++ } + if( iKeyIn!=iDelKeyOff ){ + int iKeyOut = (iKeyIn - (iKeyIn>iOff ? nShift : 0)); +- nPg += sqlite3Fts5PutVarint(&aPg[nPg], iKeyOut - iPrevKeyOut); ++ nNewPg += sqlite3Fts5PutVarint(&aPg[nNewPg], iKeyOut - iPrevKeyOut); + iPrevKeyOut = iKeyOut; + } + } + +- if( iPgIdx==nPg && nIdx>0 && pSeg->iLeafPgno!=1 ){ ++ if( p->rc==SQLITE_OK && iPgIdx==nNewPg && nIdx>0 && pSeg->iLeafPgno!=1 ){ + fts5SecureDeleteIdxEntry(p, iSegid, pSeg->iLeafPgno); + } + +- assert_nc( nPg>4 || fts5GetU16(aPg)==0 ); +- fts5DataWrite(p, FTS5_SEGMENT_ROWID(iSegid,pSeg->iLeafPgno), aPg, nPg); ++ assert_nc( nNewPg>4 || fts5GetU16(aPg)==0 ); ++ fts5DataWrite(p, FTS5_SEGMENT_ROWID(iSegid,pSeg->iLeafPgno), aPg, nNewPg); + } + sqlite3_free(aIdx); + } diff --git a/meta/recipes-support/sqlite/sqlite3_3.45.3.bb b/meta/recipes-support/sqlite/sqlite3_3.45.3.bb index e7c5bcdac4..1ff7c4f2ee 100644 --- a/meta/recipes-support/sqlite/sqlite3_3.45.3.bb +++ b/meta/recipes-support/sqlite/sqlite3_3.45.3.bb @@ -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" From patchwork Tue Dec 1 13:54:22 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jo=C3=A3o_Marcos_Costa_=28Schneider_Electric=29?= X-Patchwork-Id: 106803 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.11739.1796134012066460996 for ; Tue, 01 Dec 2026 06:06:53 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bootlin.com header.s=dkim header.b=EXcBOAWA; spf=pass (domain: bootlin.com, ip: 185.246.84.56, mailfrom: joaomarcos.costa@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 3D7A61A189B; Tue, 1 Dec 2026 14:06:50 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 11EF1603CB; Tue, 1 Dec 2026 14:06:50 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 1940B11EA25BC; Tue, 01 Dec 2026 15:06:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1796134009; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=DuYFjbzRLx+UhERRpPC1MDPYjgD7pjewPLudWUZp+ro=; b=EXcBOAWA3aW9nRm1ITcVvq4h/eoeuZ8DPGwBR0bNxJ3XNvaxG44NNQGO2RQvrOWFJ3vij+ 3hQrxaA/SUG2Nbnh/pYHzSOhQ2ajb7DFT/QJtlNL5ZCYboxyIoGpGh85ECLvHS0hYZ25jb 1JYKPg6nWVYDmdlR4CSiyQT41o4KalSukKxio2Y93NIDBfaPzHCEROUMoSyIF9NYbwif/s Ag8G7FU/DCaV/R8Kb6fXPddl1jCF8lrENNs4+QS5grZxeFwHKS8ZV0cU55XCFdRSBaE37d 9mZcP8PW1c6CPzihhOq33taj8aKz4bDlVqzx4miN3g5YXKlQRJeJlv1Z+p+nFg== From: =?utf-8?q?Jo=C3=A3o_Marcos_Costa_=28Schneider_Electric=29?= To: openembedded-core@lists.openembedded.org Cc: thomas.petazzoni@bootlin.com, yoann.congal@smile.fr, devanshp@cisco.com, =?utf-8?q?Jo=C3=A3o_Marcos_Costa_=28Schneider_Electric=29?= Subject: [scarthgap][PATCH v3 3/3] sqlite3: fix CVE-2026-119379 Date: Tue, 1 Dec 2026 14:54:22 +0100 Message-ID: <20261201135422.739530-4-joaomarcos.costa@bootlin.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261201135422.739530-1-joaomarcos.costa@bootlin.com> References: <20261201135422.739530-1-joaomarcos.costa@bootlin.com> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Tue, 01 Dec 2026 14:06:59 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/251739 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 Signed-off-by: João Marcos Costa (Schneider Electric) --- .../sqlite/sqlite3/CVE-2026-119379.patch | 80 +++++++++++++++++++ meta/recipes-support/sqlite/sqlite3_3.45.3.bb | 1 + 2 files changed, 81 insertions(+) create mode 100644 meta/recipes-support/sqlite/sqlite3/CVE-2026-119379.patch diff --git a/meta/recipes-support/sqlite/sqlite3/CVE-2026-119379.patch b/meta/recipes-support/sqlite/sqlite3/CVE-2026-119379.patch new file mode 100644 index 0000000000..d23806764c --- /dev/null +++ b/meta/recipes-support/sqlite/sqlite3/CVE-2026-119379.patch @@ -0,0 +1,80 @@ +From 2004fd88329d18803665243fbb6b3ee2f3857c2d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jo=C3=A3o=20Marcos=20Costa?= +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] + +Backport Changes: +- Applied the upstream sessionChangesetApply() fix from ext/session/sqlite3session.c + to sqlite3.c because the Yocto sqlite-autoconf source uses the + amalgamated SQLite layout. +- Omitted ext/session/sessioncorrupt.test because this extracted + recipe source contains the SQLite autoconf/amalgamation layout and + does not carry the upstream Tcl test tree. +- Omitted Git mirror metadata files manifest and manifest.uuid because + they are not required for the security fix in this source layout. + +Signed-off-by: João Marcos Costa (Schneider Electric) +--- + sqlite3.c | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +diff --git a/sqlite3.c b/sqlite3.c +index 3ba2e27..9f4fe9d 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); + } + } + diff --git a/meta/recipes-support/sqlite/sqlite3_3.45.3.bb b/meta/recipes-support/sqlite/sqlite3_3.45.3.bb index 1ff7c4f2ee..9dceb63d98 100644 --- a/meta/recipes-support/sqlite/sqlite3_3.45.3.bb +++ b/meta/recipes-support/sqlite/sqlite3_3.45.3.bb @@ -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"