From 9b9f566d2042f2b393de88506d2da964bc4d17b0 Mon Sep 17 00:00:00 2001 From: Wenzong Fan Date: Mon, 16 Oct 2017 02:31:32 -0700 Subject: sqlite3: fix CVE-2017-13685 The dump_callback function in SQLite 3.20.0 allows remote attackers to cause a denial of service (EXC_BAD_ACCESS and application crash) via a crafted file. Backport patch to fix the issue. Some references: https://sqlite.org/src/info/02f0f4c54f2819b3 http://www.mail-archive.com/sqlite-users%40mailinglists.sqlite.org/msg105314.html Signed-off-by: Wenzong Fan Signed-off-by: Ross Burton --- .../sqlite/files/sqlite3-fix-CVE-2017-13685.patch | 57 ++++++++++++++++++++++ meta/recipes-support/sqlite/sqlite3_3.20.0.bb | 1 + 2 files changed, 58 insertions(+) create mode 100644 meta/recipes-support/sqlite/files/sqlite3-fix-CVE-2017-13685.patch diff --git a/meta/recipes-support/sqlite/files/sqlite3-fix-CVE-2017-13685.patch b/meta/recipes-support/sqlite/files/sqlite3-fix-CVE-2017-13685.patch new file mode 100644 index 0000000000..aac428c821 --- /dev/null +++ b/meta/recipes-support/sqlite/files/sqlite3-fix-CVE-2017-13685.patch @@ -0,0 +1,57 @@ +Fix CVE-2017-13685 + +The dump_callback function in SQLite 3.20.0 allows remote attackers to +cause a denial of service (EXC_BAD_ACCESS and application crash) via a +crafted file. + +References: +https://sqlite.org/src/info/02f0f4c54f2819b3 +http://www.mail-archive.com/sqlite-users%40mailinglists.sqlite.org/msg105314.html + +Upstream-Status: Backport [https://sqlite.org/src/info/cf0d3715caac9149] + +CVE: CVE-2017-13685 + +Signed-off-by: Wenzong Fan + +Index: src/shell.c +================================================================== +--- src/shell.c ++++ src/shell.c +@@ -2657,10 +2657,11 @@ + int *aiType /* Column types */ + ){ + int i; + ShellState *p = (ShellState*)pArg; + ++ if( azArg==0 ) return 0; + switch( p->cMode ){ + case MODE_Line: { + int w = 5; + if( azArg==0 ) break; + for(i=0; in ) appendText(p, "|", 0); + for(i=0; i