Merge pull request #207476 from risicle/ris-sqlite-CVE-2022-46908

sqlite: add patch for CVE-2022-46908

authored by Robert Scott and committed by GitHub 05f9b8a4 38267076

+29
+25
pkgs/development/libraries/sqlite/3.39.4-autoconf-CVE-2022-46908.patch
···
··· 1 + adapted for preprocessed source files from upstream 2 + https://sqlite.org/src/vpatch?from=a60e56627fc0ef88&to=cefc032473ac5ad2 3 + 4 + diff --git a/shell.c b/shell.c 5 + index e66ae08..d423278 100644 6 + --- a/shell.c 7 + +++ b/shell.c 8 + @@ -12921,7 +12921,7 @@ static int safeModeAuth( 9 + "zipfile", 10 + "zipfile_cds", 11 + }; 12 + - UNUSED_PARAMETER(zA2); 13 + + UNUSED_PARAMETER(zA1); 14 + UNUSED_PARAMETER(zA3); 15 + UNUSED_PARAMETER(zA4); 16 + switch( op ){ 17 + @@ -12936,7 +12936,7 @@ static int safeModeAuth( 18 + case SQLITE_FUNCTION: { 19 + int i; 20 + for(i=0; i<ArraySize(azProhibitedFunctions); i++){ 21 + - if( sqlite3_stricmp(zA1, azProhibitedFunctions[i])==0 ){ 22 + + if( sqlite3_stricmp(zA2, azProhibitedFunctions[i])==0 ){ 23 + failIfSafeMode(p, "cannot use the %s() function in safe mode", 24 + azProhibitedFunctions[i]); 25 + }
+4
pkgs/development/libraries/sqlite/default.nix
··· 26 sha256 = "sha256-AzNVIHbScAx1NSJW6Rx4v1zWJJFYm6DGmu0KgYaJgOc="; 27 }; 28 29 outputs = [ "bin" "dev" "out" ]; 30 separateDebugInfo = stdenv.isLinux; 31
··· 26 sha256 = "sha256-AzNVIHbScAx1NSJW6Rx4v1zWJJFYm6DGmu0KgYaJgOc="; 27 }; 28 29 + patches = [ 30 + ./3.39.4-autoconf-CVE-2022-46908.patch 31 + ]; 32 + 33 outputs = [ "bin" "dev" "out" ]; 34 separateDebugInfo = stdenv.isLinux; 35