diff options
| author | Wang Mingyu <wangmy@cn.fujitsu.com> | 2020-06-03 18:52:00 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-06-04 13:27:32 +0100 |
| commit | c15d342e45d11b4e00c9f24d72ad2f197f242a61 (patch) | |
| tree | e98b6986faa48ef33957f42c862af8280da9e748 | |
| parent | 6ce944904f01c9e7966cfe3e744769c3ce95beb0 (diff) | |
| download | poky-c15d342e45d11b4e00c9f24d72ad2f197f242a61.tar.gz | |
sqlite: upgrade 3.31.1 -> 3.32.1
CVE-2020-11655.patch
CVE-2020-11656.patch
CVE-2020-9327.patch
removed since they are included in 3.32.1
(From OE-Core rev: 7ee8501146ceccdbd07104903694a435b75c0606)
Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-support/sqlite/files/CVE-2020-11655.patch | 32 | ||||
| -rw-r--r-- | meta/recipes-support/sqlite/files/CVE-2020-11656.patch | 70 | ||||
| -rw-r--r-- | meta/recipes-support/sqlite/files/CVE-2020-9327.patch | 141 | ||||
| -rw-r--r-- | meta/recipes-support/sqlite/sqlite3_3.32.1.bb (renamed from meta/recipes-support/sqlite/sqlite3_3.31.1.bb) | 10 |
4 files changed, 3 insertions, 250 deletions
diff --git a/meta/recipes-support/sqlite/files/CVE-2020-11655.patch b/meta/recipes-support/sqlite/files/CVE-2020-11655.patch deleted file mode 100644 index e30c482bbb..0000000000 --- a/meta/recipes-support/sqlite/files/CVE-2020-11655.patch +++ /dev/null | |||
| @@ -1,32 +0,0 @@ | |||
| 1 | From a4601326d61bf1a11151ac6b78b50804bfd03b4d Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Sakib Sajal <sakib.sajal@windriver.com> | ||
| 3 | Date: Thu, 30 Apr 2020 10:46:16 -0700 | ||
| 4 | Subject: [PATCH 2/2] In the event of a semantic error in an aggregate query, | ||
| 5 | early-out the resetAccumulator() function to prevent problems due to | ||
| 6 | incomplete or incorrect initialization of the AggInfo object. Fix for ticket | ||
| 7 | [af4556bb5c285c08]. | ||
| 8 | |||
| 9 | FossilOrigin-Name: 4a302b42c7bf5e11ddb5522ca999f74aba397d3a7eb91b1844bb02852f772441 | ||
| 10 | Upstream Status: Backport [c415d91007e1680e4eb17def583b202c3c83c718] | ||
| 11 | |||
| 12 | CVE: CVE-2020-11655 | ||
| 13 | Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> | ||
| 14 | --- | ||
| 15 | sqlite3.c | 1 + | ||
| 16 | 1 file changed, 1 insertion(+) | ||
| 17 | |||
| 18 | diff --git a/sqlite3.c b/sqlite3.c | ||
| 19 | index 1df6633..726adf7 100644 | ||
| 20 | --- a/sqlite3.c | ||
| 21 | +++ b/sqlite3.c | ||
| 22 | @@ -133242,6 +133242,7 @@ static void resetAccumulator(Parse *pParse, AggInfo *pAggInfo){ | ||
| 23 | struct AggInfo_func *pFunc; | ||
| 24 | int nReg = pAggInfo->nFunc + pAggInfo->nColumn; | ||
| 25 | if( nReg==0 ) return; | ||
| 26 | + if( pParse->nErr ) return; | ||
| 27 | #ifdef SQLITE_DEBUG | ||
| 28 | /* Verify that all AggInfo registers are within the range specified by | ||
| 29 | ** AggInfo.mnReg..AggInfo.mxReg */ | ||
| 30 | -- | ||
| 31 | 2.17.1 | ||
| 32 | |||
diff --git a/meta/recipes-support/sqlite/files/CVE-2020-11656.patch b/meta/recipes-support/sqlite/files/CVE-2020-11656.patch deleted file mode 100644 index b88a724e8c..0000000000 --- a/meta/recipes-support/sqlite/files/CVE-2020-11656.patch +++ /dev/null | |||
| @@ -1,70 +0,0 @@ | |||
| 1 | From 2d69a520d027eb73eb6da9f2653d23e33b10e8bb Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Sakib Sajal <sakib.sajal@windriver.com> | ||
| 3 | Date: Thu, 30 Apr 2020 10:14:36 -0700 | ||
| 4 | Subject: [PATCH 1/2] Fix a case when a pointer might be used after | ||
| 5 | being freed in the ALTER TABLE code. Fix for [4722bdab08cb1]. | ||
| 6 | |||
| 7 | FossilOrigin-Name: d09f8c3621d5f7f8c6d99d7d82bcaa8421855b3f470bea2b26c858106382b906 | ||
| 8 | Upstream Status: Backport [fb99e388ec7f30fe43e4878236e3695ff24ae58d] | ||
| 9 | |||
| 10 | [PATCH 2/2] Do not suppress errors when resolving references in an ORDER | ||
| 11 | BY clause belonging to a compound SELECT within a view or trigger within | ||
| 12 | ALTER TABLE. Fix for ticket [a10a14e9b4ba2]. | ||
| 13 | |||
| 14 | FossilOrigin-Name: 684293882c302600e112cf52553c19d84fdb31663d96e5dd7f8ac17dda00a026 | ||
| 15 | Upstream Status: Backport [4db7ab53f9c30e2e22731ace93ab6b18eef6c4ae] | ||
| 16 | |||
| 17 | The two patches were converted to amalgamation format. | ||
| 18 | |||
| 19 | CVE: CVE-2020-11656 | ||
| 20 | Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> | ||
| 21 | --- | ||
| 22 | sqlite3.c | 18 +++++++++++++++++- | ||
| 23 | 1 file changed, 17 insertions(+), 1 deletion(-) | ||
| 24 | |||
| 25 | diff --git a/sqlite3.c b/sqlite3.c | ||
| 26 | index 64fae04..1df6633 100644 | ||
| 27 | --- a/sqlite3.c | ||
| 28 | +++ b/sqlite3.c | ||
| 29 | @@ -97945,7 +97945,7 @@ static int resolveOrderByTermToExprList( | ||
| 30 | nc.nErr = 0; | ||
| 31 | db = pParse->db; | ||
| 32 | savedSuppErr = db->suppressErr; | ||
| 33 | - db->suppressErr = 1; | ||
| 34 | + if( IN_RENAME_OBJECT==0 ) db->suppressErr = 1; | ||
| 35 | rc = sqlite3ResolveExprNames(&nc, pE); | ||
| 36 | db->suppressErr = savedSuppErr; | ||
| 37 | if( rc ) return 0; | ||
| 38 | @@ -105383,6 +105383,21 @@ static void renameWalkWith(Walker *pWalker, Select *pSelect){ | ||
| 39 | } | ||
| 40 | } | ||
| 41 | |||
| 42 | +/* | ||
| 43 | +** Unmap all tokens in the IdList object passed as the second argument. | ||
| 44 | +*/ | ||
| 45 | +static void unmapColumnIdlistNames( | ||
| 46 | + Parse *pParse, | ||
| 47 | + IdList *pIdList | ||
| 48 | +){ | ||
| 49 | + if( pIdList ){ | ||
| 50 | + int ii; | ||
| 51 | + for(ii=0; ii<pIdList->nId; ii++){ | ||
| 52 | + sqlite3RenameTokenRemap(pParse, 0, (void*)pIdList->a[ii].zName); | ||
| 53 | + } | ||
| 54 | + } | ||
| 55 | +} | ||
| 56 | + | ||
| 57 | /* | ||
| 58 | ** Walker callback used by sqlite3RenameExprUnmap(). | ||
| 59 | */ | ||
| 60 | @@ -105404,6 +105419,7 @@ static int renameUnmapSelectCb(Walker *pWalker, Select *p){ | ||
| 61 | for(i=0; i<pSrc->nSrc; i++){ | ||
| 62 | sqlite3RenameTokenRemap(pParse, 0, (void*)pSrc->a[i].zName); | ||
| 63 | if( sqlite3WalkExpr(pWalker, pSrc->a[i].pOn) ) return WRC_Abort; | ||
| 64 | + unmapColumnIdlistNames(pParse, pSrc->a[i].pUsing); | ||
| 65 | } | ||
| 66 | } | ||
| 67 | |||
| 68 | -- | ||
| 69 | 2.17.1 | ||
| 70 | |||
diff --git a/meta/recipes-support/sqlite/files/CVE-2020-9327.patch b/meta/recipes-support/sqlite/files/CVE-2020-9327.patch deleted file mode 100644 index fecbbabce8..0000000000 --- a/meta/recipes-support/sqlite/files/CVE-2020-9327.patch +++ /dev/null | |||
| @@ -1,141 +0,0 @@ | |||
| 1 | From 45d491851e1bca378de158a5e279fd584ce548e4 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: "D. Richard Hipp" <drh@hwaci.com> | ||
| 3 | Date: Mon, 17 Feb 2020 00:12:04 +0000 | ||
| 4 | Subject: [PATCH] [PATCH 1/2] Take care when checking the table of a TK_COLUMN | ||
| 5 | expression node to see if the table is a virtual table to first ensure that | ||
| 6 | the Expr.y.pTab pointer is not null due to generated column optimizations. | ||
| 7 | Ticket [4374860b29383380]. | ||
| 8 | |||
| 9 | FossilOrigin-Name: 9d0d4ab95dc0c56e053c2924ed322a9ea7b25439e6f74599f706905a1994e454 | ||
| 10 | |||
| 11 | [PATCH 2/2] A better (smaller and faster) solution to ticket | ||
| 12 | [4374860b29383380]. | ||
| 13 | |||
| 14 | FossilOrigin-Name: abc473fb8fb999005dc79a360e34f97b3b25429decf1820dd2afa5c19577753d | ||
| 15 | |||
| 16 | The two patches were converted to amalgamation format | ||
| 17 | |||
| 18 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
| 19 | Upstream-Status: Backport | ||
| 20 | CVE: CVE-2020-9327 | ||
| 21 | --- | ||
| 22 | sqlite3.c | 35 ++++++++++++++++++++++++----------- | ||
| 23 | sqlite3.h | 2 +- | ||
| 24 | 2 files changed, 25 insertions(+), 12 deletions(-) | ||
| 25 | |||
| 26 | diff --git a/sqlite3.c b/sqlite3.c | ||
| 27 | index 55dc686..64fae04 100644 | ||
| 28 | --- a/sqlite3.c | ||
| 29 | +++ b/sqlite3.c | ||
| 30 | @@ -1167,7 +1167,7 @@ extern "C" { | ||
| 31 | */ | ||
| 32 | #define SQLITE_VERSION "3.31.1" | ||
| 33 | #define SQLITE_VERSION_NUMBER 3031001 | ||
| 34 | -#define SQLITE_SOURCE_ID "2020-01-27 19:55:54 3bfa9cc97da10598521b342961df8f5f68c7388fa117345eeb516eaa837bb4d6" | ||
| 35 | +#define SQLITE_SOURCE_ID "2020-01-27 19:55:54 3bfa9cc97da10598521b342961df8f5f68c7388fa117345eeb516eaa837balt1" | ||
| 36 | |||
| 37 | /* | ||
| 38 | ** CAPI3REF: Run-Time Library Version Numbers | ||
| 39 | @@ -17428,8 +17428,11 @@ struct Table { | ||
| 40 | */ | ||
| 41 | #ifndef SQLITE_OMIT_VIRTUALTABLE | ||
| 42 | # define IsVirtual(X) ((X)->nModuleArg) | ||
| 43 | +# define ExprIsVtab(X) \ | ||
| 44 | + ((X)->op==TK_COLUMN && (X)->y.pTab!=0 && (X)->y.pTab->nModuleArg) | ||
| 45 | #else | ||
| 46 | # define IsVirtual(X) 0 | ||
| 47 | +# define ExprIsVtab(X) 0 | ||
| 48 | #endif | ||
| 49 | |||
| 50 | /* | ||
| 51 | @@ -104133,19 +104136,25 @@ static int impliesNotNullRow(Walker *pWalker, Expr *pExpr){ | ||
| 52 | case TK_LT: | ||
| 53 | case TK_LE: | ||
| 54 | case TK_GT: | ||
| 55 | - case TK_GE: | ||
| 56 | + case TK_GE: { | ||
| 57 | + Expr *pLeft = pExpr->pLeft; | ||
| 58 | + Expr *pRight = pExpr->pRight; | ||
| 59 | testcase( pExpr->op==TK_EQ ); | ||
| 60 | testcase( pExpr->op==TK_NE ); | ||
| 61 | testcase( pExpr->op==TK_LT ); | ||
| 62 | testcase( pExpr->op==TK_LE ); | ||
| 63 | testcase( pExpr->op==TK_GT ); | ||
| 64 | testcase( pExpr->op==TK_GE ); | ||
| 65 | - if( (pExpr->pLeft->op==TK_COLUMN && IsVirtual(pExpr->pLeft->y.pTab)) | ||
| 66 | - || (pExpr->pRight->op==TK_COLUMN && IsVirtual(pExpr->pRight->y.pTab)) | ||
| 67 | + /* The y.pTab=0 assignment in wherecode.c always happens after the | ||
| 68 | + ** impliesNotNullRow() test */ | ||
| 69 | + if( (pLeft->op==TK_COLUMN && ALWAYS(pLeft->y.pTab!=0) | ||
| 70 | + && IsVirtual(pLeft->y.pTab)) | ||
| 71 | + || (pRight->op==TK_COLUMN && ALWAYS(pRight->y.pTab!=0) | ||
| 72 | + && IsVirtual(pRight->y.pTab)) | ||
| 73 | ){ | ||
| 74 | - return WRC_Prune; | ||
| 75 | + return WRC_Prune; | ||
| 76 | } | ||
| 77 | - | ||
| 78 | + } | ||
| 79 | default: | ||
| 80 | return WRC_Continue; | ||
| 81 | } | ||
| 82 | @@ -142591,7 +142600,8 @@ static int isAuxiliaryVtabOperator( | ||
| 83 | ** MATCH(expression,vtab_column) | ||
| 84 | */ | ||
| 85 | pCol = pList->a[1].pExpr; | ||
| 86 | - if( pCol->op==TK_COLUMN && IsVirtual(pCol->y.pTab) ){ | ||
| 87 | + testcase( pCol->op==TK_COLUMN && pCol->y.pTab==0 ); | ||
| 88 | + if( ExprIsVtab(pCol) ){ | ||
| 89 | for(i=0; i<ArraySize(aOp); i++){ | ||
| 90 | if( sqlite3StrICmp(pExpr->u.zToken, aOp[i].zOp)==0 ){ | ||
| 91 | *peOp2 = aOp[i].eOp2; | ||
| 92 | @@ -142613,7 +142623,8 @@ static int isAuxiliaryVtabOperator( | ||
| 93 | ** with function names in an arbitrary case. | ||
| 94 | */ | ||
| 95 | pCol = pList->a[0].pExpr; | ||
| 96 | - if( pCol->op==TK_COLUMN && IsVirtual(pCol->y.pTab) ){ | ||
| 97 | + testcase( pCol->op==TK_COLUMN && pCol->y.pTab==0 ); | ||
| 98 | + if( ExprIsVtab(pCol) ){ | ||
| 99 | sqlite3_vtab *pVtab; | ||
| 100 | sqlite3_module *pMod; | ||
| 101 | void (*xNotUsed)(sqlite3_context*,int,sqlite3_value**); | ||
| 102 | @@ -142636,10 +142647,12 @@ static int isAuxiliaryVtabOperator( | ||
| 103 | int res = 0; | ||
| 104 | Expr *pLeft = pExpr->pLeft; | ||
| 105 | Expr *pRight = pExpr->pRight; | ||
| 106 | - if( pLeft->op==TK_COLUMN && IsVirtual(pLeft->y.pTab) ){ | ||
| 107 | + testcase( pLeft->op==TK_COLUMN && pLeft->y.pTab==0 ); | ||
| 108 | + if( ExprIsVtab(pLeft) ){ | ||
| 109 | res++; | ||
| 110 | } | ||
| 111 | - if( pRight && pRight->op==TK_COLUMN && IsVirtual(pRight->y.pTab) ){ | ||
| 112 | + testcase( pRight && pRight->op==TK_COLUMN && pRight->y.pTab==0 ); | ||
| 113 | + if( pRight && ExprIsVtab(pRight) ){ | ||
| 114 | res++; | ||
| 115 | SWAP(Expr*, pLeft, pRight); | ||
| 116 | } | ||
| 117 | @@ -228440,7 +228453,7 @@ SQLITE_API int sqlite3_stmt_init( | ||
| 118 | #endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_STMTVTAB) */ | ||
| 119 | |||
| 120 | /************** End of stmt.c ************************************************/ | ||
| 121 | -#if __LINE__!=228443 | ||
| 122 | +#if __LINE__!=228456 | ||
| 123 | #undef SQLITE_SOURCE_ID | ||
| 124 | #define SQLITE_SOURCE_ID "2020-01-27 19:55:54 3bfa9cc97da10598521b342961df8f5f68c7388fa117345eeb516eaa837balt2" | ||
| 125 | #endif | ||
| 126 | diff --git a/sqlite3.h b/sqlite3.h | ||
| 127 | index cef6eea..5b9796c 100644 | ||
| 128 | --- a/sqlite3.h | ||
| 129 | +++ b/sqlite3.h | ||
| 130 | @@ -125,7 +125,7 @@ extern "C" { | ||
| 131 | */ | ||
| 132 | #define SQLITE_VERSION "3.31.1" | ||
| 133 | #define SQLITE_VERSION_NUMBER 3031001 | ||
| 134 | -#define SQLITE_SOURCE_ID "2020-01-27 19:55:54 3bfa9cc97da10598521b342961df8f5f68c7388fa117345eeb516eaa837bb4d6" | ||
| 135 | +#define SQLITE_SOURCE_ID "2020-01-27 19:55:54 3bfa9cc97da10598521b342961df8f5f68c7388fa117345eeb516eaa837balt1" | ||
| 136 | |||
| 137 | /* | ||
| 138 | ** CAPI3REF: Run-Time Library Version Numbers | ||
| 139 | -- | ||
| 140 | 2.25.1 | ||
| 141 | |||
diff --git a/meta/recipes-support/sqlite/sqlite3_3.31.1.bb b/meta/recipes-support/sqlite/sqlite3_3.32.1.bb index 57a791385c..d6081f10ad 100644 --- a/meta/recipes-support/sqlite/sqlite3_3.31.1.bb +++ b/meta/recipes-support/sqlite/sqlite3_3.32.1.bb | |||
| @@ -3,13 +3,9 @@ require sqlite3.inc | |||
| 3 | LICENSE = "PD" | 3 | LICENSE = "PD" |
| 4 | LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=786d3dc581eff03f4fd9e4a77ed00c66" | 4 | LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=786d3dc581eff03f4fd9e4a77ed00c66" |
| 5 | 5 | ||
| 6 | SRC_URI = "http://www.sqlite.org/2020/sqlite-autoconf-${SQLITE_PV}.tar.gz \ | 6 | SRC_URI = "http://www.sqlite.org/2020/sqlite-autoconf-${SQLITE_PV}.tar.gz" |
| 7 | file://CVE-2020-9327.patch \ | 7 | SRC_URI[md5sum] = "bc7afc06f1e30b09ac930957af68d723" |
| 8 | file://CVE-2020-11656.patch \ | 8 | SRC_URI[sha256sum] = "486748abfb16abd8af664e3a5f03b228e5f124682b0c942e157644bf6fff7d10" |
| 9 | file://CVE-2020-11655.patch \ | ||
| 10 | " | ||
| 11 | SRC_URI[md5sum] = "2d0a553534c521504e3ac3ad3b90f125" | ||
| 12 | SRC_URI[sha256sum] = "62284efebc05a76f909c580ffa5c008a7d22a1287285d68b7825a2b6b51949ae" | ||
| 13 | 9 | ||
| 14 | # -19242 is only an issue in specific development branch commits | 10 | # -19242 is only an issue in specific development branch commits |
| 15 | CVE_CHECK_WHITELIST += "CVE-2019-19242" | 11 | CVE_CHECK_WHITELIST += "CVE-2019-19242" |
