]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
sqlite3: Fix CVE-2025-70873
authorVijay Anusuri <vanusuri@mvista.com>
Thu, 2 Apr 2026 08:13:49 +0000 (13:43 +0530)
committerYoann Congal <yoann.congal@smile.fr>
Thu, 23 Apr 2026 08:15:13 +0000 (10:15 +0200)
Pick patch as per [1]

[1] https://sqlite.org/src/info/3d459f1fb1bd1b5e
[2] https://sqlite.org/forum/forumpost/761eac3c82
[3] https://gist.github.com/cnwangjihe/f496393f30f5ecec5b18c8f5ab072054

Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
meta/recipes-support/sqlite/sqlite3/CVE-2025-70873.patch [new file with mode: 0644]
meta/recipes-support/sqlite/sqlite3_3.45.3.bb

diff --git a/meta/recipes-support/sqlite/sqlite3/CVE-2025-70873.patch b/meta/recipes-support/sqlite/sqlite3/CVE-2025-70873.patch
new file mode 100644 (file)
index 0000000..2125110
--- /dev/null
@@ -0,0 +1,33 @@
+From 5a05c59d4d75c03f23d5fb70feac9f789954bf8a Mon Sep 17 00:00:00 2001
+From: drh <>
+Date: Sat, 6 Dec 2025 20:41:24 +0000
+Subject: [PATCH] In the zipfile extension, only return as many bytes as
+ Inflate actually generated.  [forum:/forumpost/761eac3c82|Forum post
+ 761eac3c82]. Adjust ./configure so that it builds zipfile into testfixture if
+ ZLIB is available, so that tests get run on unix platforms.
+
+FossilOrigin-Name: 3d459f1fb1bd1b5e723629c463ab392af7b206ece3388bda216c6a4c26160909
+
+Upstream-Status: Backport [https://github.com/sqlite/sqlite/commit/5a05c59d4d75c03f23d5fb70feac9f789954bf8a]
+CVE: CVE-2025-70873
+Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
+---
+ shell.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/shell.c b/shell.c
+index ecace5a..8c3740c 100644
+--- a/shell.c
++++ b/shell.c
+@@ -10277,7 +10277,7 @@ static void zipfileInflate(
+       if( err!=Z_STREAM_END ){
+         zipfileCtxErrorMsg(pCtx, "inflate() failed (%d)", err);
+       }else{
+-        sqlite3_result_blob(pCtx, aRes, nOut, zipfileFree);
++        sqlite3_result_blob(pCtx, aRes, (int)str.total_out, zipfileFree);
+         aRes = 0;
+       }
+     }
+-- 
+2.43.0
+
index 05bfaac1af9e0615abc0103ca72756bdd636166e..1b3ac83b58dcc353084842b6b3792cfc33ce8a90 100644 (file)
@@ -8,6 +8,7 @@ SRC_URI = "http://www.sqlite.org/2024/sqlite-autoconf-${SQLITE_PV}.tar.gz \
            file://CVE-2025-29088.patch \
            file://CVE-2025-6965.patch \
            file://CVE-2025-7709.patch \
+           file://CVE-2025-70873.patch \
           "
 SRC_URI[sha256sum] = "b2809ca53124c19c60f42bf627736eae011afdcc205bb48270a5ee9a38191531"