summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support')
-rw-r--r--meta/recipes-support/sqlite/files/CVE-2020-13434.patch48
-rw-r--r--meta/recipes-support/sqlite/sqlite3_3.31.1.bb1
2 files changed, 49 insertions, 0 deletions
diff --git a/meta/recipes-support/sqlite/files/CVE-2020-13434.patch b/meta/recipes-support/sqlite/files/CVE-2020-13434.patch
new file mode 100644
index 0000000000..40c5e6f2ce
--- /dev/null
+++ b/meta/recipes-support/sqlite/files/CVE-2020-13434.patch
@@ -0,0 +1,48 @@
1From dd6c33d372f3b83f4fe57904c2bd5ebba5c38018 Mon Sep 17 00:00:00 2001
2From: drh <drh@noemail.net>
3Date: Sat, 23 May 2020 19:58:07 +0000
4Subject: [PATCH] Limit the "precision" of floating-point to text conversions
5 in the printf() function to 100,000,000. Fix for ticket [23439ea582241138].
6
7FossilOrigin-Name: d08d3405878d394e08e5d3af281246edfbd81ca74cc8d16458808591512fb93d
8
9Upstream-Status: Backport
10CVE: CVE-2020-13434
11
12Reference to upstream patch:
13https://github.com/sqlite/sqlite/commit/dd6c33d372f3b83f4fe57904c2bd5ebba5c38018
14
15Patch converted to amalgamation format
16
17Signed-off-by: Steve Sakoman <steve@sakoman.com>
18---
19diff --git a/sqlite3.c b/sqlite3.c
20index 55dc686..5ff2c14 100644
21--- a/sqlite3.c
22+++ b/sqlite3.c
23@@ -28147,6 +28147,13 @@ static char *printfTempBuf(sqlite3_str *pAccum, sqlite3_int64 n){
24 #endif
25 #define etBUFSIZE SQLITE_PRINT_BUF_SIZE /* Size of the output buffer */
26
27+/*
28+** Hard limit on the precision of floating-point conversions.
29+*/
30+#ifndef SQLITE_PRINTF_PRECISION_LIMIT
31+# define SQLITE_FP_PRECISION_LIMIT 100000000
32+#endif
33+
34 /*
35 ** Render a string given by "fmt" into the StrAccum object.
36 */
37@@ -28468,6 +28475,11 @@ SQLITE_API void sqlite3_str_vappendf(
38 length = 0;
39 #else
40 if( precision<0 ) precision = 6; /* Set default precision */
41+#ifdef SQLITE_FP_PRECISION_LIMIT
42+ if( precision>SQLITE_FP_PRECISION_LIMIT ){
43+ precision = SQLITE_FP_PRECISION_LIMIT;
44+ }
45+#endif
46 if( realvalue<0.0 ){
47 realvalue = -realvalue;
48 prefix = '-';
diff --git a/meta/recipes-support/sqlite/sqlite3_3.31.1.bb b/meta/recipes-support/sqlite/sqlite3_3.31.1.bb
index e5071b48bb..c8225fff15 100644
--- a/meta/recipes-support/sqlite/sqlite3_3.31.1.bb
+++ b/meta/recipes-support/sqlite/sqlite3_3.31.1.bb
@@ -8,6 +8,7 @@ SRC_URI = "http://www.sqlite.org/2020/sqlite-autoconf-${SQLITE_PV}.tar.gz \
8 file://CVE-2020-11656.patch \ 8 file://CVE-2020-11656.patch \
9 file://CVE-2020-11655.patch \ 9 file://CVE-2020-11655.patch \
10 file://CVE-2020-15358.patch \ 10 file://CVE-2020-15358.patch \
11 file://CVE-2020-13434.patch \
11 " 12 "
12SRC_URI[md5sum] = "2d0a553534c521504e3ac3ad3b90f125" 13SRC_URI[md5sum] = "2d0a553534c521504e3ac3ad3b90f125"
13SRC_URI[sha256sum] = "62284efebc05a76f909c580ffa5c008a7d22a1287285d68b7825a2b6b51949ae" 14SRC_URI[sha256sum] = "62284efebc05a76f909c580ffa5c008a7d22a1287285d68b7825a2b6b51949ae"