From d3c96bd5a6d3d64ab9c61104c6078b4bc89b12ec Mon Sep 17 00:00:00 2001 From: Baruch Siach Date: Sun, 22 Oct 2017 16:00:08 +0200 Subject: [PATCH] sqlite: add security patches 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. CVE-2017-15286: SQLite 3.20.1 has a NULL pointer dereference in tableColumnList in shell.c because it fails to consider certain cases where `sqlite3_step(pStmt)==SQLITE_ROW` is false and a data structure is never initialized. Signed-off-by: Baruch Siach Signed-off-by: Thomas Petazzoni --- package/sqlite/0001-CVE-2017-13685.patch | 54 ++++++++++++++++++++++++ package/sqlite/0002-CVE-2017-15286.patch | 28 ++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 package/sqlite/0001-CVE-2017-13685.patch create mode 100644 package/sqlite/0002-CVE-2017-15286.patch diff --git a/package/sqlite/0001-CVE-2017-13685.patch b/package/sqlite/0001-CVE-2017-13685.patch new file mode 100644 index 0000000000..9fd88f27e2 --- /dev/null +++ b/package/sqlite/0001-CVE-2017-13685.patch @@ -0,0 +1,54 @@ +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. + +Patch taken from Debian: +https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=873762 + +Upstream issue: https://sqlite.org/src/info/02f0f4c54f2819b3 + +Signed-off-by: Baruch Siach + +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