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"