summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support
diff options
context:
space:
mode:
authorQi.Chen@windriver.com <Qi.Chen@windriver.com>2019-10-16 10:05:17 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-10-29 09:08:17 +0000
commit4f5919d899adb0ad087ef3cf5229f42314dbe951 (patch)
tree77d6f1eafd3a5245aedda0042e9e2128832902d3 /meta/recipes-support
parent4cecfe6e9d9e9216d9235feec25460c4011bf65f (diff)
downloadpoky-4f5919d899adb0ad087ef3cf5229f42314dbe951.tar.gz
sqlite3: fix CVE-2019-16168
(From OE-Core rev: 948b0dd6d91eeed529c6983141ab80327fa4ae9c) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support')
-rw-r--r--meta/recipes-support/sqlite/files/0001-Fix-CVE-2019-16168.patch40
-rw-r--r--meta/recipes-support/sqlite/sqlite3_3.29.0.bb3
2 files changed, 42 insertions, 1 deletions
diff --git a/meta/recipes-support/sqlite/files/0001-Fix-CVE-2019-16168.patch b/meta/recipes-support/sqlite/files/0001-Fix-CVE-2019-16168.patch
new file mode 100644
index 0000000000..7c4a65b3cd
--- /dev/null
+++ b/meta/recipes-support/sqlite/files/0001-Fix-CVE-2019-16168.patch
@@ -0,0 +1,40 @@
1From fcf06b0b426e6c243d6ca2d6c6a02830717ab6a3 Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Tue, 15 Oct 2019 13:22:52 +0800
4Subject: [PATCH] Fix CVE-2019-16168
5
6CVE: CVE-2019-16168
7
8Upstream-Status: Backport [https://www.sqlite.org/src/vpatch?from=4f5b2d938194fab7&to=98357d8c1263920b]
9
10Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
11---
12 sqlite3.c | 5 ++++-
13 1 file changed, 4 insertions(+), 1 deletion(-)
14
15diff --git a/sqlite3.c b/sqlite3.c
16index 61bfdeb..b3e6ae2 100644
17--- a/sqlite3.c
18+++ b/sqlite3.c
19@@ -105933,7 +105933,9 @@ static void decodeIntArray(
20 if( sqlite3_strglob("unordered*", z)==0 ){
21 pIndex->bUnordered = 1;
22 }else if( sqlite3_strglob("sz=[0-9]*", z)==0 ){
23- pIndex->szIdxRow = sqlite3LogEst(sqlite3Atoi(z+3));
24+ int sz = sqlite3Atoi(z+3);
25+ if( sz<2 ) sz = 2;
26+ pIndex->szIdxRow = sqlite3LogEst(sz);
27 }else if( sqlite3_strglob("noskipscan*", z)==0 ){
28 pIndex->noSkipScan = 1;
29 }
30@@ -143260,6 +143262,7 @@ static int whereLoopAddBtreeIndex(
31 ** it to pNew->rRun, which is currently set to the cost of the index
32 ** seek only. Then, if this is a non-covering index, add the cost of
33 ** visiting the rows in the main table. */
34+ assert( pSrc->pTab->szTabRow>0 );
35 rCostIdx = pNew->nOut + 1 + (15*pProbe->szIdxRow)/pSrc->pTab->szTabRow;
36 pNew->rRun = sqlite3LogEstAdd(rLogSize, rCostIdx);
37 if( (pNew->wsFlags & (WHERE_IDX_ONLY|WHERE_IPK))==0 ){
38--
392.17.1
40
diff --git a/meta/recipes-support/sqlite/sqlite3_3.29.0.bb b/meta/recipes-support/sqlite/sqlite3_3.29.0.bb
index 07e36bede7..34066fbe89 100644
--- a/meta/recipes-support/sqlite/sqlite3_3.29.0.bb
+++ b/meta/recipes-support/sqlite/sqlite3_3.29.0.bb
@@ -3,6 +3,7 @@ require sqlite3.inc
3LICENSE = "PD" 3LICENSE = "PD"
4LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=786d3dc581eff03f4fd9e4a77ed00c66" 4LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=786d3dc581eff03f4fd9e4a77ed00c66"
5 5
6SRC_URI = "http://www.sqlite.org/2019/sqlite-autoconf-${SQLITE_PV}.tar.gz" 6SRC_URI = "http://www.sqlite.org/2019/sqlite-autoconf-${SQLITE_PV}.tar.gz \
7 file://0001-Fix-CVE-2019-16168.patch"
7SRC_URI[md5sum] = "8f3dfe83387e62ecb91c7c5c09c688dc" 8SRC_URI[md5sum] = "8f3dfe83387e62ecb91c7c5c09c688dc"
8SRC_URI[sha256sum] = "8e7c1e2950b5b04c5944a981cb31fffbf9d2ddda939d536838ebc854481afd5b" 9SRC_URI[sha256sum] = "8e7c1e2950b5b04c5944a981cb31fffbf9d2ddda939d536838ebc854481afd5b"