diff options
-rw-r--r-- | meta/recipes-support/sqlite/files/CVE-2023-36191.patch | 37 | ||||
-rw-r--r-- | meta/recipes-support/sqlite/sqlite3_3.38.5.bb | 1 |
2 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-support/sqlite/files/CVE-2023-36191.patch b/meta/recipes-support/sqlite/files/CVE-2023-36191.patch new file mode 100644 index 0000000000..aca79c334a --- /dev/null +++ b/meta/recipes-support/sqlite/files/CVE-2023-36191.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | From 4e8a0eb4e773b808d9e9697af94319599777169a Mon Sep 17 00:00:00 2001 | ||
2 | From: larrybr <larrybr@noemail.net> | ||
3 | Date: Fri, 2 Jun 2023 12:56:32 +0000 | ||
4 | Subject: [PATCH] Fix CLI fault on missing -nonce reported by [forum:/info/f8c14a1134|forum post f8c14a1134]. | ||
5 | |||
6 | FossilOrigin-Name: cd24178bbaad4a1dafc3848e7d74240f90030160b5c43c93e1e0e11b073c2df5 | ||
7 | |||
8 | Upstream-Status: Backport [https://sqlite.org/src/info/cd24178bbaad4a1d | ||
9 | Upstream commit https://github.com/sqlite/sqlite/commit/4e8a0eb4e773b808d9e9697af94319599777169a] | ||
10 | CVE: CVE-2023-36191 | ||
11 | Signed-off-by: Vijay Anusuri <vanusuri@mvista.com> | ||
12 | --- | ||
13 | shell.c | 8 ++++++-- | ||
14 | 1 file changed, 6 insertions(+), 2 deletions(-) | ||
15 | |||
16 | diff --git a/shell.c b/shell.c | ||
17 | index 0200c0a..fa45d40 100644 | ||
18 | --- a/shell.c | ||
19 | +++ b/shell.c | ||
20 | @@ -23163,8 +23163,12 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){ | ||
21 | }else if( strcmp(z,"-bail")==0 ){ | ||
22 | bail_on_error = 1; | ||
23 | }else if( strcmp(z,"-nonce")==0 ){ | ||
24 | - free(data.zNonce); | ||
25 | - data.zNonce = strdup(argv[++i]); | ||
26 | + if( data.zNonce ) free(data.zNonce); | ||
27 | + if( i+1 < argc ) data.zNonce = strdup(argv[++i]); | ||
28 | + else{ | ||
29 | + data.zNonce = 0; | ||
30 | + break; | ||
31 | + } | ||
32 | }else if( strcmp(z,"-safe")==0 ){ | ||
33 | /* no-op - catch this on the second pass */ | ||
34 | } | ||
35 | -- | ||
36 | 2.25.1 | ||
37 | |||
diff --git a/meta/recipes-support/sqlite/sqlite3_3.38.5.bb b/meta/recipes-support/sqlite/sqlite3_3.38.5.bb index 313c15dff4..55cc514412 100644 --- a/meta/recipes-support/sqlite/sqlite3_3.38.5.bb +++ b/meta/recipes-support/sqlite/sqlite3_3.38.5.bb | |||
@@ -6,6 +6,7 @@ LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=786d3dc581eff03f4fd9e4a77ed0 | |||
6 | SRC_URI = "http://www.sqlite.org/2022/sqlite-autoconf-${SQLITE_PV}.tar.gz \ | 6 | SRC_URI = "http://www.sqlite.org/2022/sqlite-autoconf-${SQLITE_PV}.tar.gz \ |
7 | file://0001-sqlite-Increased-the-size-of-loop-variables-in-the-printf-implementation.patch \ | 7 | file://0001-sqlite-Increased-the-size-of-loop-variables-in-the-printf-implementation.patch \ |
8 | file://CVE-2022-46908.patch \ | 8 | file://CVE-2022-46908.patch \ |
9 | file://CVE-2023-36191.patch \ | ||
9 | " | 10 | " |
10 | SRC_URI[sha256sum] = "5af07de982ba658fd91a03170c945f99c971f6955bc79df3266544373e39869c" | 11 | SRC_URI[sha256sum] = "5af07de982ba658fd91a03170c945f99c971f6955bc79df3266544373e39869c" |
11 | 12 | ||