FreeBSD Bugzilla – Attachment 191730 Details for
Bug 226840
CVE-2018-8740
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
CVE-2018-8740, path
sqlite3-20180322.diff (text/plain), 2.16 KB, created by
Pavel Volkov
on 2018-03-22 08:22:55 UTC
(
hide
)
Description:
CVE-2018-8740, path
Filename:
MIME Type:
Creator:
Pavel Volkov
Created:
2018-03-22 08:22:55 UTC
Size:
2.16 KB
patch
obsolete
>diff -urN databases/sqlite3.orig/files/patch-sqlite3.c databases/sqlite3/files/patch-sqlite3.c >--- databases/sqlite3.orig/files/patch-sqlite3.c 1970-01-01 03:00:00.000000000 +0300 >+++ databases/sqlite3/files/patch-sqlite3.c 2018-03-22 10:34:13.886395000 +0300 >@@ -0,0 +1,36 @@ >+Detect databases whose schema is corrupted using a CREATE TABLE AS statement and issue an appropriate error message. >+Check-in [d75e6765], https://www.sqlite.org/src/info/d75e67654aa9620b >+https://bugs.launchpad.net/ubuntu/+source/sqlite3/+bug/1756349 >+https://nvd.nist.gov/vuln/detail/CVE-2018-8740 >+ >+--- sqlite3.c.orig 2018-03-22 07:08:21 UTC >++++ sqlite3.c >+@@ -103474,8 +103474,6 @@ SQLITE_PRIVATE void sqlite3EndTable( >+ p = pParse->pNewTable; >+ if( p==0 ) return; >+ >+- assert( !db->init.busy || !pSelect ); >+- >+ /* If the db->init.busy is 1 it means we are reading the SQL off the >+ ** "sqlite_master" or "sqlite_temp_master" table on the disk. >+ ** So do not write to the disk again. Extract the root page number >+@@ -103486,6 +103484,10 @@ SQLITE_PRIVATE void sqlite3EndTable( >+ ** table itself. So mark it read-only. >+ */ >+ if( db->init.busy ){ >++ if( pSelect ){ >++ sqlite3ErrorMsg(pParse, ""); >++ return; >++ } >+ p->tnum = db->init.newTnum; >+ if( p->tnum==1 ) p->tabFlags |= TF_Readonly; >+ } >+@@ -117813,7 +117815,7 @@ static void corruptSchema( >+ char *z; >+ if( zObj==0 ) zObj = "?"; >+ z = sqlite3MPrintf(db, "malformed database schema (%s)", zObj); >+- if( zExtra ) z = sqlite3MPrintf(db, "%z - %s", z, zExtra); >++ if( zExtra && zExtra[0] ) z = sqlite3MPrintf(db, "%z - %s", z, zExtra); >+ sqlite3DbFree(db, *pData->pzErrMsg); >+ *pData->pzErrMsg = z; >+ } >diff -urN databases/sqlite3.orig/Makefile databases/sqlite3/Makefile >--- databases/sqlite3.orig/Makefile 2018-03-22 10:07:16.323539000 +0300 >+++ databases/sqlite3/Makefile 2018-03-22 10:59:52.856223000 +0300 >@@ -3,6 +3,7 @@ > > PORTNAME= sqlite3 > DISTVERSION= 3.22.0 >+PORTREVISION= 1 > CATEGORIES= databases > MASTER_SITES= https://www.sqlite.org/2018/ http://www2.sqlite.org/2018/ http://www3.sqlite.org/2018/ > DISTNAME= sqlite-autoconf-${PORTVERSION:C/\.([[:digit:]])[[:>:]]/0\1/g:S/.//g}00
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
pavelivolkov
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 226840
: 191730