parent
6bce2af0c7
commit
8e781c9286
41
sqlite-3.20.1-CVE-2017-13685.patch
Normal file
41
sqlite-3.20.1-CVE-2017-13685.patch
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
ndex: 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; i<nArg; i++){
|
||||||
|
@@ -3007,10 +3008,11 @@
|
||||||
|
*/
|
||||||
|
static int captureOutputCallback(void *pArg, int nArg, char **azArg, char **az){
|
||||||
|
ShellText *p = (ShellText*)pArg;
|
||||||
|
int i;
|
||||||
|
UNUSED_PARAMETER(az);
|
||||||
|
+ if( azArg==0 ) return 0;
|
||||||
|
if( p->n ) appendText(p, "|", 0);
|
||||||
|
for(i=0; i<nArg; i++){
|
||||||
|
if( i ) appendText(p, ",", 0);
|
||||||
|
if( azArg[i] ) appendText(p, azArg[i], 0);
|
||||||
|
}
|
||||||
|
@@ -3888,11 +3890,11 @@
|
||||||
|
const char *zType;
|
||||||
|
const char *zSql;
|
||||||
|
ShellState *p = (ShellState *)pArg;
|
||||||
|
|
||||||
|
UNUSED_PARAMETER(azNotUsed);
|
||||||
|
- if( nArg!=3 ) return 1;
|
||||||
|
+ if( nArg!=3 || azArg==0 ) return 0;
|
||||||
|
zTable = azArg[0];
|
||||||
|
zType = azArg[1];
|
||||||
|
zSql = azArg[2];
|
||||||
|
|
||||||
|
if( strcmp(zTable, "sqlite_sequence")==0 ){
|
33
sqlite-3.20.1-CVE-2017-15286.patch
Normal file
33
sqlite-3.20.1-CVE-2017-15286.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
Index: src/shell.c
|
||||||
|
==================================================================
|
||||||
|
--- src/shell.c
|
||||||
|
+++ src/shell.c
|
||||||
|
@@ -3799,10 +3799,11 @@
|
||||||
|
isIPK = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sqlite3_finalize(pStmt);
|
||||||
|
+ if( azCol==0 ) return 0;
|
||||||
|
azCol[0] = 0;
|
||||||
|
azCol[nCol+1] = 0;
|
||||||
|
|
||||||
|
/* The decision of whether or not a rowid really needs to be preserved
|
||||||
|
** is tricky. We never need to preserve a rowid for a WITHOUT ROWID table
|
||||||
|
|
||||||
|
Index: src/shell.c.in
|
||||||
|
==================================================================
|
||||||
|
--- src/shell.c.in
|
||||||
|
+++ src/shell.c.in
|
||||||
|
@@ -2439,10 +2439,11 @@
|
||||||
|
isIPK = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sqlite3_finalize(pStmt);
|
||||||
|
+ if( azCol==0 ) return 0;
|
||||||
|
azCol[0] = 0;
|
||||||
|
azCol[nCol+1] = 0;
|
||||||
|
|
||||||
|
/* The decision of whether or not a rowid really needs to be preserved
|
||||||
|
** is tricky. We never need to preserve a rowid for a WITHOUT ROWID table
|
11
sqlite.spec
11
sqlite.spec
@ -10,7 +10,7 @@
|
|||||||
Summary: Library that implements an embeddable SQL database engine
|
Summary: Library that implements an embeddable SQL database engine
|
||||||
Name: sqlite
|
Name: sqlite
|
||||||
Version: %{rpmver}
|
Version: %{rpmver}
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
License: Public Domain
|
License: Public Domain
|
||||||
Group: Applications/Databases
|
Group: Applications/Databases
|
||||||
URL: http://www.sqlite.org/
|
URL: http://www.sqlite.org/
|
||||||
@ -36,6 +36,10 @@ Patch7: sqlite-3.16-datetest-2.2c.patch
|
|||||||
Patch8: sqlite-3.18.0-sync2-dirsync.patch
|
Patch8: sqlite-3.18.0-sync2-dirsync.patch
|
||||||
# Upstream: https://www.sqlite.org/cgi/src/timeline?r=corrupt-schema
|
# Upstream: https://www.sqlite.org/cgi/src/timeline?r=corrupt-schema
|
||||||
Patch9: sqlite-3.22.0-corrupt-schema.patch
|
Patch9: sqlite-3.22.0-corrupt-schema.patch
|
||||||
|
# Upstream: https://sqlite.org/src/info/cf0d3715caac9149
|
||||||
|
Patch10: sqlite-3.20.1-CVE-2017-13685.patch
|
||||||
|
# Upstream: https://sqlite.org/src/info/5d0ceb8dcdef92cd
|
||||||
|
Patch11: sqlite-3.20.1-CVE-2017-15286.patch
|
||||||
|
|
||||||
BuildRequires: ncurses-devel readline-devel glibc-devel
|
BuildRequires: ncurses-devel readline-devel glibc-devel
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
@ -140,6 +144,8 @@ This package contains the analysis program for %{name}.
|
|||||||
%endif
|
%endif
|
||||||
%patch8 -p1
|
%patch8 -p1
|
||||||
%patch9 -p0
|
%patch9 -p0
|
||||||
|
%patch10 -p0
|
||||||
|
%patch11 -p0
|
||||||
|
|
||||||
autoconf # Rerun with new autoconf to add support for aarm64
|
autoconf # Rerun with new autoconf to add support for aarm64
|
||||||
|
|
||||||
@ -243,6 +249,9 @@ make test
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu May 31 2018 Petr Kubat <pkubat@redhat.com> - 3.20.1-3
|
||||||
|
- Fixed CVE-2017-13685 CVE-2017-15286 (#1488884)
|
||||||
|
|
||||||
* Wed Mar 21 2018 Petr Kubat <pkubat@redhat.com> - 3.20.1-2
|
* Wed Mar 21 2018 Petr Kubat <pkubat@redhat.com> - 3.20.1-2
|
||||||
- Fixed CVE-2018-8740 (#1558809)
|
- Fixed CVE-2018-8740 (#1558809)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user