You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 67f3bb8
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: CHANGELOG.md
+35-7Lines changed: 35 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,12 +12,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
12
12
-_VLE_: `sqlite3mc_vle_version(value)`: returns the format version of a VLE value (NULL if the argument is not a VLE value).
13
13
-_VLE_: Option `legacy=0|1` for `sqlite3mc_vle_key()` (default 1): when 0, values in format version 1 are rejected on decryption.
14
14
-_VLE_: INTEGER values are accepted as scope (equivalent to `CAST(scope AS TEXT)`).
15
+
- Added compile-time symbol `SQLITE3MC_WASM_USE_GETENTROPY` to select `getentropy()` instead of `__wasi_random_get()` for random number generation on WASI targets.
15
16
16
17
### Changed
17
18
18
19
- Based on SQLite version 3.54.1
19
20
- Updated several SQLite extensions
20
-
- Added return type to function `sqlite3mcRekeySetFinalCipher`
21
21
- Added various missing OOM checks
22
22
- Removed unused function from AEGIS cipher implementation
23
23
-_Argon2_ parameters are now validated:
@@ -36,16 +36,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
36
36
- hexadecimal string if it consists of hexadecimal characters only
37
37
- binary string if it contains at least 1 non-hexadecimal character
38
38
In all cases the input length (excluding the prefix) must match the expected length:
39
-
- hexadecimal: 2*keyLength or 2*(keyLength+saltLength)
40
-
- binary: keyLength or (keyLength+saltLength)
39
+
- hexadecimal: `2*keyLength` or `2*(keyLength+saltLength)`
40
+
- binary: `keyLength` or `(keyLength+saltLength)`
41
41
An invalid input length or an invalid encoding will be reported as an error.
42
+
For the SQLCipher notation the behaviour is the same as in the original: any value that does not exactly match the raw key format is treated as a normal passphrase.
42
43
- Improved cipher configuration
43
-
- The SQL function sqlite3mc_config did not fully check for valid parameter values (like valid page sizes). This has been fixed. In case of invalid parameter values error messages are now returned instead of NULL values.
44
-
- Integer URI and VLE parameters are now handled as 64-bit values to avoid automatic conversion to 32-bit values. This allows improved range checks.
44
+
- The SQL function `sqlite3mc_config` did not fully check for valid parameter values (like valid page sizes). This has been fixed. In case of invalid parameter values error messages are now returned instead of NULL values.
45
+
- Integer parameters (including URI and VLE parameters) are now read as 64-bit values and checked against the valid 32-bit range. Oversized values are rejected instead of being silently converted (previously they could wrap to small, accepted values).
45
46
- Key specification in ATTACH statements is now checked properly to prevent silently ignoring encryption if the VFS of the attached database doesn't support encryption.
47
+
- Cipher parameter tables exist per connection. The global parameter tables cannot be changed through a connection.
48
+
- Cipher _aes256cbc_ now obeys a change of the parameter `kdf_iter`. Previously the parameter was accepted, but always 4001 iterations were used.
46
49
- Removed support for WAL legacy mode
47
50
- Prevent ChaCha20 counter overflow
48
51
A counter overflow is handled differently in the hardware-accelerated ChaCha20 implementations than in the scalar implementation. A counter overflow is now prevented, so that all ChaCha20 implementations deliver the same encryption.
52
+
- Options `SQLITE_ENABLE_ATOMIC_WRITE` and `SQLITE_ENABLE_BATCH_ATOMIC_WRITE` are now disabled (also removed from the Android build), as atomic-write journal handling is not supported by the encryption layer
53
+
- Functions `sqlite3mc_config` and `sqlite3mc_codec_data` are now registered as direct-only (they can no longer be used in triggers, views, etc.)
54
+
- The maximum length of cipher names (custom cipher registration) was increased to 64, as documented (names up to 63 characters)
55
+
- Restructured rekey operation
56
+
- Improved initialization sequence and error handling (mainly VFS)
49
57
50
58
### Fixed
51
59
@@ -60,18 +68,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
60
68
- Do not change salt on rekeying, unless explicitly requested (pragma rekey_salt)
61
69
- Added checks to identify encrypted database and hot journal to prevent removing a valid journal
62
70
- Fixed issue [#280](../../issues/#280) - Check in backup procedure corrected
71
+
- Fixed issue [#286](../../issues/286) - Issues compiling versions 2.6.0 and 2.6.1 to WebAssembly
72
+
- Defining the symbol `SQLITE3MC_WASM_USE_GETENTROPY` restores the behaviour of versions < 2.6.0 (use of `getentropy()` instead of `__wasi_random_get()`)
73
+
- The order of checks in `sqlite3mcSecureZeroMemory` was changed, so that `explicit_bzero` is used on WASI targets even if the compiler defaults to C23 (`memset_explicit` is not available in wasi libc)
74
+
- Fixed _wxSQLite3_ issue [#134](https://github.com/utelle/wxsqlite3/issues/134) - Build fails if `memset_s` is unavailable (for example, on PowerPC macOS). The selection of the secure zeroing function via preprocessor macros was adjusted (this also fixes the function selection for NetBSD).
75
+
- Errors occurring during key setup via URI parameters are now passed up (previously a database could silently be left unencrypted)
63
76
- Fixed bugs in VLE feature and improved error handling
64
77
-**Argon2: return code of key derivation is now checked.**
65
78
Previously, _SQLite3 Multiple Ciphers_ did not evaluate the return value of the _Argon2_ key derivation function. If _Argon2_ rejected the parameters (e.g. `mcost < 8 * pcost`) or failed internally (e.g. memory allocation failure), the error was silently ignored and the cipher continued with a key that had not been derived from the passphrase. Such failures are now detected and reported as an error, e.g. by `PRAGMA key`, `PRAGMA rekey`, `sqlite3_key`, `sqlite3_rekey` and when opening a database.
66
79
-_VLE_: Missing check of the return value of `sqlite3_set_clientdata` in the VLE context setup (potential use after free on out-of-memory).
67
80
-_VLE_: Plaintext remained in the buffer after a failed authentication; temporary buffers are now wiped.
68
81
-_VLE_: Corrupt decrypted values led to a silent NULL result instead of an error.
69
-
- Fixed various mutex issues
82
+
- Fixed encryption of temporary files; stale counter data behind the end of a temporary file is now cleared
83
+
- Fixed deadlock caused by sorter worker threads
84
+
- Fixed various mutex issues; access to global state variables (including cached CPU and AES hardware features) is now thread-safe
70
85
- Fixed codec use in sqlite3_deserialize
86
+
- Cloning a cipher no longer invalidates the source cipher
87
+
- The secure memory allocator is no longer wrapped twice
88
+
- Errors on adjusting the page size while setting the key are now reported (previously ignored)
89
+
-`PRAGMA cipher_salt`: an allocation failure no longer deletes the pending salt
90
+
-`sqlite3mc_cipher_name_copy`: the size of the result buffer is now checked (previously a zero-size buffer could be written to)
91
+
- Cipher schemes _aes128cbc_ and _aes256cbc_: fixed signed integer overflow (undefined behaviour) in the IV derivation at page number 2^31-1
92
+
- Fixed order of two entry pairs in the core dispatch table (`preupdate_old/new`, `win32_set_directory8/16`)
93
+
- Fixed opening of `/dev/random` (now with `O_CLOEXEC`)
71
94
72
95
### Compatibility note
73
96
74
-
Applications that used _Argon2_ parameter combinations rejected by the _Argon2_ library will now receive an error instead of continuing silently.
97
+
- Applications that used _Argon2_ parameter combinations rejected by the _Argon2_ library will now receive an error instead of continuing silently.
98
+
- Databases created with _aes256cbc_ and a non-default `kdf_iter` value were actually encrypted with 4001 iterations. To open such databases, set `kdf_iter` to 4001.
99
+
- Applications must enable encryption (i.e. specify the key) before using a temporary database. Temporary files opened while encryption was not yet enabled are not encrypted.
100
+
- For legacy _SQLCipher_ databases setting `legacy` != 0 is mandatory. The compile-time defaults are only valid for non-legacy databases.
101
+
- WAL legacy mode is no longer supported.
75
102
76
103
### VLE Migration
77
104
@@ -92,6 +119,7 @@ disable legacy reading:
92
119
- Values encrypted with `sqlite3mc_vle_encrypt()` under one scope could be decrypted successfully under another scope using the same VLE key (ASCON128: scope had no effect at all; ChaCha20: weak derivation; both: non-TEXT/BLOB scopes silently mapped to the default scope).
93
120
- New values are written in format version 2, in which the scope is cryptographically bound via a derived subkey.
94
121
- Existing values (format version 1) remain readable but keep the old weakness until they are re-encrypted.
122
+
- Errors during key setup via URI parameters and key specifications in `ATTACH` statements (including attached databases using a different VFS) can no longer silently result in an unencrypted database.
Copy file name to clipboardExpand all lines: packaging/release-notes.md.in
+28-8Lines changed: 28 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,37 @@
1
1
## Changes since previous release
2
2
3
-
This release includes a number of minor and major improvements and fixes a number of bugs that have been discovered since the last release.
3
+
This release focuses on robustness and security hardening.
4
4
5
-
- Based on SQLite version 3.54.1
6
-
- Improved handling of failures (like OOM)
7
-
- Improved handling of raw key and salt
8
-
- Fixed problems with the _ChaCha20_ hardware acceleration introduced in version 2.6.0
9
-
- Fixed several issues in the VLE feature
10
-
- Fixed many other issues
5
+
**An update is strongly recommended.**
11
6
12
7
Details can be found in the [change log](https://github.com/utelle/SQLite3MultipleCiphers/blob/main/CHANGELOG.md) and the [commit history](https://github.com/utelle/SQLite3MultipleCiphers/commits/main/).
13
8
14
-
**An update is strongly recommended.**
9
+
### Security
10
+
11
+
- Key setup errors (URI parameters, `ATTACH`, also with another VFS) can no longer silently result in an unencrypted database
12
+
- VLE: the scope is now cryptographically bound to encrypted values (new value format version 2). Existing values stay readable until re-encrypted, see the CHANGELOG for the migration.
13
+
- Argon2: the result of the key derivation is now checked; invalid parameters are rejected
14
+
15
+
### Fixes
16
+
17
+
- Backup API could deliver corrupted databases (#280)
18
+
- Reworked rekey handling, hot-journal detection and handling of partial page reads (#291–#294)
19
+
- ChaCha20 counter overflow prevented, so that all implementations deliver identical results
20
+
- Many mutex/thread-safety and out-of-memory fixes, including a deadlock with sorter worker threads
21
+
- Build fixes for WebAssembly/WASI (#286, new option `SQLITE3MC_WASM_USE_GETENTROPY`) and for platforms without `memset_s` (wxSQLite3 #134)
0 commit comments