summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/sqlite
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/sqlite')
-rw-r--r--meta/recipes-support/sqlite/files/CVE-2020-35525.patch21
-rw-r--r--meta/recipes-support/sqlite/files/CVE-2020-35527.patch22
-rw-r--r--meta/recipes-support/sqlite/files/CVE-2021-20223.patch23
-rw-r--r--meta/recipes-support/sqlite/files/CVE-2022-35737.patch29
-rw-r--r--meta/recipes-support/sqlite/files/CVE-2023-7104.patch46
-rw-r--r--meta/recipes-support/sqlite/sqlite3.inc1
-rw-r--r--meta/recipes-support/sqlite/sqlite3_3.31.1.bb5
7 files changed, 147 insertions, 0 deletions
diff --git a/meta/recipes-support/sqlite/files/CVE-2020-35525.patch b/meta/recipes-support/sqlite/files/CVE-2020-35525.patch
new file mode 100644
index 0000000000..27d81d42d9
--- /dev/null
+++ b/meta/recipes-support/sqlite/files/CVE-2020-35525.patch
@@ -0,0 +1,21 @@
1From: drh <drh@noemail.net>
2Date: Thu, 20 Feb 2020 14:08:51 +0000
3Subject: [PATCH] Early-out on the INTERSECT query processing following an
4 error.
5
6Upstream-Status: Backport [http://security.debian.org/debian-security/pool/updates/main/s/sqlite3/sqlite3_3.27.2-3+deb10u2.debian.tar.xz]
7CVE: CVE-2020-35525
8Signed-off-by: Virendra Thakur <virendrak@kpit.com>
9---
10Index: sqlite-autoconf-3310100/sqlite3.c
11===================================================================
12--- sqlite-autoconf-3310100.orig/sqlite3.c
13+++ sqlite-autoconf-3310100/sqlite3.c
14@@ -130767,6 +130767,7 @@ static int multiSelect(
15 /* Generate code to take the intersection of the two temporary
16 ** tables.
17 */
18+ if( rc ) break;
19 assert( p->pEList );
20 iBreak = sqlite3VdbeMakeLabel(pParse);
21 iCont = sqlite3VdbeMakeLabel(pParse);
diff --git a/meta/recipes-support/sqlite/files/CVE-2020-35527.patch b/meta/recipes-support/sqlite/files/CVE-2020-35527.patch
new file mode 100644
index 0000000000..d1dae389b0
--- /dev/null
+++ b/meta/recipes-support/sqlite/files/CVE-2020-35527.patch
@@ -0,0 +1,22 @@
1From: dan <dan@noemail.net>
2Date: Mon, 26 Oct 2020 13:24:36 +0000
3Subject: [PATCH] Fix a problem with ALTER TABLE for views that have a nested
4 FROM clause. Ticket [f50af3e8a565776b].
5
6Upstream-Status: Backport [http://security.debian.org/debian-security/pool/updates/main/s/sqlite3/sqlite3_3.27.2-3+deb10u2.debian.tar.xz]
7CVE: CVE-2020-35527
8Signed-off-by: Virendra Thakur <virendra.thakur@kpit.com>
9---
10Index: sqlite-autoconf-3310100/sqlite3.c
11===================================================================
12--- sqlite-autoconf-3310100.orig/sqlite3.c
13+++ sqlite-autoconf-3310100/sqlite3.c
14@@ -133110,7 +133110,7 @@ static int selectExpander(Walker *pWalke
15 pNew = sqlite3ExprListAppend(pParse, pNew, pExpr);
16 sqlite3TokenInit(&sColname, zColname);
17 sqlite3ExprListSetName(pParse, pNew, &sColname, 0);
18- if( pNew && (p->selFlags & SF_NestedFrom)!=0 ){
19+ if( pNew && (p->selFlags & SF_NestedFrom)!=0 && !IN_RENAME_OBJECT ){
20 struct ExprList_item *pX = &pNew->a[pNew->nExpr-1];
21 sqlite3DbFree(db, pX->zEName);
22 if( pSub ){
diff --git a/meta/recipes-support/sqlite/files/CVE-2021-20223.patch b/meta/recipes-support/sqlite/files/CVE-2021-20223.patch
new file mode 100644
index 0000000000..e9d2e04d30
--- /dev/null
+++ b/meta/recipes-support/sqlite/files/CVE-2021-20223.patch
@@ -0,0 +1,23 @@
1From d1d43efa4fb0f2098c0e2c5bf2e807c58d5ec05b Mon Sep 17 00:00:00 2001
2From: dan <dan@noemail.net>
3Date: Mon, 26 Oct 2020 13:24:36 +0000
4Subject: [PATCH] Prevent fts5 tokenizer unicode61 from considering '\0' to be
5 a token characters, even if other characters of class "Cc" are.
6
7FossilOrigin-Name: b7b7bde9b7a03665e3691c6d51118965f216d2dfb1617f138b9f9e60e418ed2f
8
9CVE: CVE-2021-20223
10Upstream-Status: Backport [https://github.com/sqlite/sqlite/commit/d1d43efa4fb0f2098c0e2c5bf2e807c58d5ec05b.patch]
11Comment: Removed manifest, manifest.uuid and fts5tok1.test as these files are not present in the amalgamated source code
12Signed-Off-by: Sana.Kazi@kpit.com
13---
14--- a/sqlite3.c 2022-09-09 13:54:30.010768197 +0530
15+++ b/sqlite3.c 2022-09-09 13:56:25.458769142 +0530
16@@ -227114,6 +227114,7 @@
17 }
18 iTbl++;
19 }
20+ aAscii[0] = 0; /* 0x00 is never a token character */
21 }
22
23 /*
diff --git a/meta/recipes-support/sqlite/files/CVE-2022-35737.patch b/meta/recipes-support/sqlite/files/CVE-2022-35737.patch
new file mode 100644
index 0000000000..341e002913
--- /dev/null
+++ b/meta/recipes-support/sqlite/files/CVE-2022-35737.patch
@@ -0,0 +1,29 @@
1From 2bbf4c999dbb4b520561a57e0bafc19a15562093 Mon Sep 17 00:00:00 2001
2From: Hitendra Prajapati <hprajapati@mvista.com>
3Date: Fri, 2 Sep 2022 11:22:29 +0530
4Subject: [PATCH] CVE-2022-35737
5
6Upstream-Status: Backport [https://www.sqlite.org/src/info/aab790a16e1bdff7]
7CVE: CVE-2022-35737
8Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
9---
10 sqlite3.c | 3 ++-
11 1 file changed, 2 insertions(+), 1 deletion(-)
12
13diff --git a/sqlite3.c b/sqlite3.c
14index f664217..33dfb78 100644
15--- a/sqlite3.c
16+++ b/sqlite3.c
17@@ -28758,7 +28758,8 @@ SQLITE_API void sqlite3_str_vappendf(
18 case etSQLESCAPE: /* %q: Escape ' characters */
19 case etSQLESCAPE2: /* %Q: Escape ' and enclose in '...' */
20 case etSQLESCAPE3: { /* %w: Escape " characters */
21- int i, j, k, n, isnull;
22+ i64 i, j, k, n;
23+ int isnull;
24 int needQuote;
25 char ch;
26 char q = ((xtype==etSQLESCAPE3)?'"':'\''); /* Quote character */
27--
282.25.1
29
diff --git a/meta/recipes-support/sqlite/files/CVE-2023-7104.patch b/meta/recipes-support/sqlite/files/CVE-2023-7104.patch
new file mode 100644
index 0000000000..01ff29ff5e
--- /dev/null
+++ b/meta/recipes-support/sqlite/files/CVE-2023-7104.patch
@@ -0,0 +1,46 @@
1From eab426c5fba69d2c77023939f72b4ad446834e3c Mon Sep 17 00:00:00 2001
2From: dan <Dan Kennedy>
3Date: Thu, 7 Sep 2023 13:53:09 +0000
4Subject: [PATCH] Fix a buffer overread in the sessions extension that could occur when processing a corrupt changeset.
5
6Upstream-Status: Backport [https://sqlite.org/src/info/0e4e7a05c4204b47]
7CVE: CVE-2023-7104
8Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
9---
10 sqlite3.c | 18 +++++++++++-------
11 1 file changed, 11 insertions(+), 7 deletions(-)
12
13diff --git a/sqlite3.c b/sqlite3.c
14index 972ef18..c645ac8 100644
15--- a/sqlite3.c
16+++ b/sqlite3.c
17@@ -203301,15 +203301,19 @@ static int sessionReadRecord(
18 }
19 }
20 if( eType==SQLITE_INTEGER || eType==SQLITE_FLOAT ){
21- sqlite3_int64 v = sessionGetI64(aVal);
22- if( eType==SQLITE_INTEGER ){
23- sqlite3VdbeMemSetInt64(apOut[i], v);
24+ if( (pIn->nData-pIn->iNext)<8 ){
25+ rc = SQLITE_CORRUPT_BKPT;
26 }else{
27- double d;
28- memcpy(&d, &v, 8);
29- sqlite3VdbeMemSetDouble(apOut[i], d);
30+ sqlite3_int64 v = sessionGetI64(aVal);
31+ if( eType==SQLITE_INTEGER ){
32+ sqlite3VdbeMemSetInt64(apOut[i], v);
33+ }else{
34+ double d;
35+ memcpy(&d, &v, 8);
36+ sqlite3VdbeMemSetDouble(apOut[i], d);
37+ }
38+ pIn->iNext += 8;
39 }
40- pIn->iNext += 8;
41 }
42 }
43 }
44--
452.25.1
46
diff --git a/meta/recipes-support/sqlite/sqlite3.inc b/meta/recipes-support/sqlite/sqlite3.inc
index 07614bdb3e..1adc0eba66 100644
--- a/meta/recipes-support/sqlite/sqlite3.inc
+++ b/meta/recipes-support/sqlite/sqlite3.inc
@@ -1,4 +1,5 @@
1SUMMARY = "Embeddable SQL database engine" 1SUMMARY = "Embeddable SQL database engine"
2DESCRIPTION = "A library that implements a small, fast, self-contained, high-reliability, full-featured, SQL database engine. SQLite is the most used database engine in the world. SQLite is built into all mobile phones and most computers and comes bundled inside countless other applications that people use every day"
2HOMEPAGE = "http://www.sqlite.org" 3HOMEPAGE = "http://www.sqlite.org"
3SECTION = "libs" 4SECTION = "libs"
4 5
diff --git a/meta/recipes-support/sqlite/sqlite3_3.31.1.bb b/meta/recipes-support/sqlite/sqlite3_3.31.1.bb
index 877e80f5a3..0e7bcfa5a7 100644
--- a/meta/recipes-support/sqlite/sqlite3_3.31.1.bb
+++ b/meta/recipes-support/sqlite/sqlite3_3.31.1.bb
@@ -13,6 +13,11 @@ SRC_URI = "http://www.sqlite.org/2020/sqlite-autoconf-${SQLITE_PV}.tar.gz \
13 file://CVE-2020-13630.patch \ 13 file://CVE-2020-13630.patch \
14 file://CVE-2020-13631.patch \ 14 file://CVE-2020-13631.patch \
15 file://CVE-2020-13632.patch \ 15 file://CVE-2020-13632.patch \
16 file://CVE-2022-35737.patch \
17 file://CVE-2020-35525.patch \
18 file://CVE-2020-35527.patch \
19 file://CVE-2021-20223.patch \
20 file://CVE-2023-7104.patch \
16 " 21 "
17SRC_URI[md5sum] = "2d0a553534c521504e3ac3ad3b90f125" 22SRC_URI[md5sum] = "2d0a553534c521504e3ac3ad3b90f125"
18SRC_URI[sha256sum] = "62284efebc05a76f909c580ffa5c008a7d22a1287285d68b7825a2b6b51949ae" 23SRC_URI[sha256sum] = "62284efebc05a76f909c580ffa5c008a7d22a1287285d68b7825a2b6b51949ae"