summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorVivek Kumbhar <vkumbhar@mvista.com>2022-12-20 11:45:12 +0530
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-01-06 17:33:23 +0000
commitbbe38cd6376f2ed2fff4e14f3385df62e0ecf1bd (patch)
tree9740e1e6b1c2a804649107dd50b77fa2eefc57aa /meta
parent2f4691f403c293349738a1c3040b74db21592159 (diff)
downloadpoky-bbe38cd6376f2ed2fff4e14f3385df62e0ecf1bd.tar.gz
sqlite: fix CVE-2022-46908 safe mode authorizer callback allows disallowed UDFs.
(From OE-Core rev: 18641988caa131436f75dd3c279ce5af3380481a) Signed-off-by: Vivek Kumbhar <vkumbhar@mvista.com> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-support/sqlite/files/CVE-2022-46908.patch39
-rw-r--r--meta/recipes-support/sqlite/sqlite3_3.38.5.bb1
2 files changed, 40 insertions, 0 deletions
diff --git a/meta/recipes-support/sqlite/files/CVE-2022-46908.patch b/meta/recipes-support/sqlite/files/CVE-2022-46908.patch
new file mode 100644
index 0000000000..38bd544838
--- /dev/null
+++ b/meta/recipes-support/sqlite/files/CVE-2022-46908.patch
@@ -0,0 +1,39 @@
1From 1b779afa3ed2f35a110e460fc6ed13cba744db85 2022-12-05 02:52:37 UTC
2From: larrybr <larrybr@sqlite.org>
3Date: 2022-12-05 02:52:37 UTC
4Subject: [PATCH] Fix safe mode authorizer callback to reject disallowed UDFs
5
6Fix safe mode authorizer callback to reject disallowed UDFs. Reported at Forum post 07beac8056151b2f.
7
8Upstream-Status: Backport [https://sqlite.org/src/info/cefc032473ac5ad2]
9CVE-2022-46908
10Signed-off-by: Vivek Kumbhar <vkumbhar@mvista.com>
11---
12 shell.c | 4 ++--
13 1 file changed, 2 insertions(+), 2 deletions(-)
14
15diff --git a/shell.c b/shell.c
16index d104768..0200c0a 100644
17--- a/shell.c
18+++ b/shell.c
19@@ -12894,7 +12894,7 @@ static int safeModeAuth(
20 "zipfile",
21 "zipfile_cds",
22 };
23- UNUSED_PARAMETER(zA2);
24+ UNUSED_PARAMETER(zA1);
25 UNUSED_PARAMETER(zA3);
26 UNUSED_PARAMETER(zA4);
27 switch( op ){
28@@ -12905,7 +12905,7 @@ static int safeModeAuth(
29 case SQLITE_FUNCTION: {
30 int i;
31 for(i=0; i<ArraySize(azProhibitedFunctions); i++){
32- if( sqlite3_stricmp(zA1, azProhibitedFunctions[i])==0 ){
33+ if( sqlite3_stricmp(zA2, azProhibitedFunctions[i])==0 ){
34 failIfSafeMode(p, "cannot use the %s() function in safe mode",
35 azProhibitedFunctions[i]);
36 }
37--
382.30.2
39
diff --git a/meta/recipes-support/sqlite/sqlite3_3.38.5.bb b/meta/recipes-support/sqlite/sqlite3_3.38.5.bb
index 628f630657..313c15dff4 100644
--- a/meta/recipes-support/sqlite/sqlite3_3.38.5.bb
+++ b/meta/recipes-support/sqlite/sqlite3_3.38.5.bb
@@ -5,6 +5,7 @@ LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=786d3dc581eff03f4fd9e4a77ed0
5 5
6SRC_URI = "http://www.sqlite.org/2022/sqlite-autoconf-${SQLITE_PV}.tar.gz \ 6SRC_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" 9"
9SRC_URI[sha256sum] = "5af07de982ba658fd91a03170c945f99c971f6955bc79df3266544373e39869c" 10SRC_URI[sha256sum] = "5af07de982ba658fd91a03170c945f99c971f6955bc79df3266544373e39869c"
10 11